SPC58EC with Flash driver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-15 11:02 PM
Hello, I am currently struggline with flash program with some tools.
The tool send 62byte data with CAN FD and I want to write down it.
I am using SPC5Studio with Flash_driver (ssd_c55.h)
* FILE NAME : ssd_c55.h *
* DATE : December 19, 2011 *
* AUTHOR : FPT Team
and the function exported.
extern UINT32 FlashProgram ( PSSD_CONFIG pSSDConfig,
BOOL factoryPgmFlag,
UINT32 dest,
UINT32 size,
UINT32 source,
PCONTEXT_DATA pCtxData
);
I modify the eeprom_lld.c as bleow for programming the software. I checked that the len=8U works. (8U is defined in examples.)
If the len is set to 6, it is not work. in case of 4 then it is partly works. (4byte date programmed and 4bytes are skipped). Are there any way to write down the data with variable length?
uint32_t eeprom_lld_flashprogram(uint32_t address, uint64_t buffer, uint32_t len) {
uint32_t returnvalue;
uint32_t bufferpointer;
uint32_t result;
CONTEXT_DATA pgmCtxData;
bufferpointer = (uint32_t)(&buffer);
returnvalue = FlashProgram(&ssdConfig, FALSE, address, len, bufferpointer, &pgmCtxData);
if (C55_OK == returnvalue) {
/* Call FlashCheckStatus() to check status of the progress */
while (C55_INPROGRESS == FlashCheckStatus(&ssdConfig, C55_MODE_OP_PROGRAM, &result, &pgmCtxData)) {
}
if (C55_OK != result) {
return FLASH_ERROR_PROGRAM;
}
}
else {
return FLASH_ERROR_PROGRAM;
}
(void)buffer;
return FLASH_OK;
}
Daniel Yang
Thansk
Solved! Go to Solution.
- Labels:
-
SPC5 Automotive MCUs
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-18 7:25 AM - edited ‎2024-01-18 7:25 AM
Hello ,
cf UM2636.pdf
In FlashProgram ,
size Size, in bytes, of the Flash region to be
programmed.
If size = 0, C55_OK returns.
It should be multiple of word and its combination with dest should
fall in either main array or UTest block.
multiple by 8, i think
Best regards
Erwan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-18 7:25 AM - edited ‎2024-01-18 7:25 AM
Hello ,
cf UM2636.pdf
In FlashProgram ,
size Size, in bytes, of the Flash region to be
programmed.
If size = 0, C55_OK returns.
It should be multiple of word and its combination with dest should
fall in either main array or UTest block.
multiple by 8, i think
Best regards
Erwan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-18 2:33 PM
Hello Erwan
Thanks for the reply, I tested with several value and it works with multiple of 8.
It does not work with multiple of 4.
Are there any source code avalable for the flash driver.
When I check the item from internet, I find following two document
it do not shows the full code.
https://community.nxp.com/docs/DOC-105380
https://community.nxp.com/docs/DOC-106580
I am not sure are there any code with C file or not.
Thanks.
Best regards
Joonseok YANG
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-19 12:28 AM
Sorry Joonseok ,
we have only the library in SPC5Studio Tools Suite.
SPC56/57/58 shoudl have the same flash driver as MPC56/57
Best Regards
Erwan
