For S32K3, does MBDT have access to the EEPROM functionality?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

For S32K3, does MBDT have access to the EEPROM functionality?

跳至解决方案
1,468 次查看
Wei_H
Contributor III

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.

0 项奖励
回复
1 解答
1,421 次查看
robertv
NXP Employee
NXP Employee

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.
qspi.png

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.

header.png

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:
s32dsqspi.png

Regards,
Robert V

在原帖中查看解决方案

2 回复数
1,422 次查看
robertv
NXP Employee
NXP Employee

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.
qspi.png

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.

header.png

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:
s32dsqspi.png

Regards,
Robert V

1,445 次查看
Wei_H
Contributor III

Specially, we know that the S32K344 evaluation kit that has MX25L6433FM2I-08G chip for Non-Volatile memory.  My question is, to access the chip for flashing, how to set up SPI in the configure tool for MBDT and what is the SPI protocol to program it?

Thanks.

0 项奖励
回复