Is there EEPROM access within the MBDT library? If not, how do we use custom linker, and how do we store variables declared in Simulink to store in the non-volatile memory, and how to access that memory from during run time? Or is there any other recommended method? Thank you.
已解决! 转到解答。
Hello @Wei_H ,
The closest you could get to a behavior similar to reading/writing to/from EEPROM memory would be to use the FEE blocks. But this does not accomplish your goals of having persistent data, given the fact that FEE uses FLASH memory.
As for the question about custom linker usage, you can find out more about the workflow by checking out Chapter 3.13 from the Release notes document, found inside the Toolbox installation at S32K3\src\mbdtbx_s32k3\help\docs\manual\Model_Based_Design_Toolbox_S32K3_Series_Release_Notes.pdf.
In regards to the MX25L6433FM2I-08G chip on the board, it seems like it is connected through Quad SPI and the connections being made are:
- SIO0 - QSPI_IO0 - PTD11
- SIO1 - QSPI_IO1 - PTD7
- SIO2 - QSPI_IO2 - PTD12
- SIO3 - QSPI_IO3 - PTC2
- CS - QSPI_CS - PTC3
- SCLK - QSPI_SCK - PTD10
I assume you are using the MR-CANHUBK344 Q172 board and the previously mentioned connections have been taken out of its schematic. In case you are using a different board, please let me know.
Since we do not support QuadSPI, your approach here would consist of adding the QSPI driver in the model's configuration, properly setting the parameters and all the necessary dependencies (e.g.: clocks, interrupts, pins etc.) and then using the QSPI protocol through custom code.
For header insertions you could use the Model Header block, and for actual code, you could use the Subsystem Initialize block. An alternative to using these blocks would be to change the board initialization file to add these includes and instructions.
I went ahead and tried to find any other threads about using this external flash on your board and here is a thread I found:
https://community.nxp.com/t5/S32K/S32K344-MRCANHUBK344-QSPI-Example-Timeout/m-p/2054546
This thread also highlighted the fact that there's an S32 Design Studio example available that could serve as a starting point for your project:
Regards,
Robert V
Hello @Wei_H ,
The closest you could get to a behavior similar to reading/writing to/from EEPROM memory would be to use the FEE blocks. But this does not accomplish your goals of having persistent data, given the fact that FEE uses FLASH memory.
As for the question about custom linker usage, you can find out more about the workflow by checking out Chapter 3.13 from the Release notes document, found inside the Toolbox installation at S32K3\src\mbdtbx_s32k3\help\docs\manual\Model_Based_Design_Toolbox_S32K3_Series_Release_Notes.pdf.
In regards to the MX25L6433FM2I-08G chip on the board, it seems like it is connected through Quad SPI and the connections being made are:
- SIO0 - QSPI_IO0 - PTD11
- SIO1 - QSPI_IO1 - PTD7
- SIO2 - QSPI_IO2 - PTD12
- SIO3 - QSPI_IO3 - PTC2
- CS - QSPI_CS - PTC3
- SCLK - QSPI_SCK - PTD10
I assume you are using the MR-CANHUBK344 Q172 board and the previously mentioned connections have been taken out of its schematic. In case you are using a different board, please let me know.
Since we do not support QuadSPI, your approach here would consist of adding the QSPI driver in the model's configuration, properly setting the parameters and all the necessary dependencies (e.g.: clocks, interrupts, pins etc.) and then using the QSPI protocol through custom code.
For header insertions you could use the Model Header block, and for actual code, you could use the Subsystem Initialize block. An alternative to using these blocks would be to change the board initialization file to add these includes and instructions.
I went ahead and tried to find any other threads about using this external flash on your board and here is a thread I found:
https://community.nxp.com/t5/S32K/S32K344-MRCANHUBK344-QSPI-Example-Timeout/m-p/2054546
This thread also highlighted the fact that there's an S32 Design Studio example available that could serve as a starting point for your project:
Regards,
Robert V