forked driver
Dependents: ESHD_L475VG_IOT01-Sensors-BSP
Revision 3:f31e1990e1f3, committed 2019-08-30
- Comitter:
- stillChris
- Date:
- Fri Aug 30 06:13:56 2019 +0000
- Parent:
- 2:9a0f9faada7f
- Commit message:
- Verified SPI messages over SPI1. Verification was done using an o'scope against the MB85RS64V data sheet. Final release of this driver kit will include a summary with O'scope screen shots. Follow link to external website.; ;
Changed in this revision
MB85RSxx_SPI.cpp | Show annotated file Show diff for this revision Revisions of this file |
MB85RSxx_SPI.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/MB85RSxx_SPI.cpp Fri Aug 18 05:27:05 2017 +0000 +++ b/MB85RSxx_SPI.cpp Fri Aug 30 06:13:56 2019 +0000 @@ -36,8 +36,21 @@ _di_p(new DigitalOut(nss)), _di(*_di_p) { + char sts; + printf("SPI pointer %x\n", _spi_p); + printf("SPI_CS pointer %x\n", _di_p); + _spi.format(8,0); - _spi.frequency(10000000); + _spi.frequency(2000000); + + _spi.write(RDID); + for(int i=0; i<8; i++) + { + sts=_spi.write(0x00); + printf("byte%i %x\n", i, sts); + } + printf("\n\n"); + } MB85RSxx_SPI::~MB85RSxx_SPI()
--- a/MB85RSxx_SPI.h Fri Aug 18 05:27:05 2017 +0000 +++ b/MB85RSxx_SPI.h Fri Aug 30 06:13:56 2019 +0000 @@ -38,12 +38,15 @@ #define WRSR 0x01 #define READ 0x03 #define WRITE 0x02 +#define RDID 0x9f #define SR_WPEN 0x80 #define SR_BP0 0x08 #define SR_BP1 0x04 #define SR_WEL 0x02 + + /** Interface for accessing Fujitsu MB85RSxx FRAM * * @code @@ -148,6 +151,7 @@ SPI &_spi; DigitalOut *_di_p; DigitalOut &_di; + int _rdid; }; #endif