2062715_en-US

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

2062715_en-US

2062715_en-US

Questions about the S32K116

MCU: S32K116

Desired Functionality: UDS-based bootloader and EEPROM enablement.

Questions:
1.Where should the UDS-based bootloader be stored? According to AN12218, the bootloader is stored in DFlash. However, the Unified Bootloader User Guide, Rev. 2 describes the bootloader being stored in PFlash.2.If EEPROM needs to be enabled, at least 24KB of the 32KB FlexNVM must be allocated to E-Flash. Can the remaining 8KB store the UDS bootloader?
3.If the bootloader can be stored in PFlash, can the desired functionality be fully supported?
4.If not, which MCU should be used to achieve both functionalities? For example, S32K144?

Re: Questions about the S32K116

Yes, your understanding is correct.

Re: Questions about the S32K116

We have this application note which talks about A/B swap and using CAN:
https://www.nxp.com/docs/en/application-note/AN12323.pdf
https://www.nxp.com/docs/en/application-note-software/AN12323SW.zip

There are two use-cases - one for S32K144 which has one read partition only on program flash, so the application cannot run during the update. And then for S32K146 which has two read partitions, the application still runs during the update.

The first use-case could be used also on S32K116 but it's all about the memory size. If you are able to squeeze everything to 128KB, it's possible.

Regards,
Lukas

Re: Questions about the S32K116Hi,luka
I have a new question.
I want to implement AB swap upgrades via UDS (on CAN) on the S32K116.
According to the Unified Bootloader User Guide, the bootloader code size is up to 54KB.
The application needs to implement UART and CANFD communication and be able to store data in EEPROM during runtime. I added the S32K116's LPUART and CAN_PAL to the S32DS example, and the compiled size is about 22KB.
P-Flash stores the bootloader, FirmwareA, and FirmwareB. FlexNVM is used as E-Flash.

Is it possible to achieve this on the S32K116?
Re: Questions about the S32K1163. As mentioned above, the only limitation is that you can't access program flash while it is being programmed or erased.

->If the bootloader is stored in P-Flash, during an upgrade (programming or erasing) via the bootloader, the bootloader cannot access the P-Flash area (read/write operations). It must wait until the programming or erasing is completed before it can continue accessing the P-Flash area.
Is my understanding correct?
Re: Questions about the S32K116

Hi @whale 

1. Both options are possible, it depends on your needs.
Generaly, it's usually all about read partitions. Devices S32K11x, S32K142 and S32K144 have only one read partition on program flash. So, the code must run from RAM or from data flash when programming the program flash. This is the main limitation. Devices S32K146 and S32K148 has more read partitions (2 and 3), so the bootloader can run from first partition while programming second or third partitionn and there won't be troubles with read-while-write errors.

2. Yes, 8KB data flash can be used for any purpose. I recommend to check section "36.5.9.4 Allowed simultaneous flash operations" in the S32K1 reference manual.

3. As mentioned above, the only limitation is that you can't access program flash while it is being programmed or erased.

4. If it is not acceptable for you, an option is to select S32K146 which has two 512KB read partitions in program flash.

Regards,
Lukas

Tags (1)
No ratings
Version history
Last update:
‎11-21-2025 02:02 PM
Updated by: