On SPC563xx, are there any known problems with writing to Flash and runing code, i.e. interrupts, at the same time?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-09-23 07:22 AM
I run code from Low and Mid address space and write to High address space in Flash C90LC. If I have interrupts enabled during write, the MCU frequently locks up.
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-09-29 07:05 AM
Hello Marcus ,
no issue has been noticed
Have you checked SPC563Mxx_RLA Flash Test Application for Discovery in SPC5Studio Tools Suite or RM0015 ?
/*==================== Lock to Protect Shadow Row ====================*/
returnCode = pSetLock( &ssdConfig, LOCK_SHADOW_PRIMARY, 1, FLASH_LMLR_PASSWORD );
if ( C90FL_OK != returnCode )
{
ErrorTrap(returnCode);
}
returnCode = pSetLock( &ssdConfig, LOCK_SHADOW_SECONDARY, 1, FLASH_SLMLR_PASSWORD );
if ( C90FL_OK != returnCode )
{
ErrorTrap(returnCode);
}
/*====== Unlock all blocks in low address space ======*/
returnCode = pGetLock( &ssdConfig, LOCK_LOW_PRIMARY, &blkLockEnabled, &blkLockState );
if ( C90FL_OK != returnCode )
{
ErrorTrap(returnCode);
}
returnCode = pSetLock( &ssdConfig, LOCK_LOW_PRIMARY, (blkLockState & 0xFFFFFF00), FLASH_LMLR_PASSWORD);
if ( C90FL_OK != returnCode )
{
ErrorTrap(returnCode);
}
returnCode = pGetLock( &ssdConfig, LOCK_LOW_SECONDARY, &blkLockEnabled, &blkLockState );
if ( C90FL_OK != returnCode )
{
ErrorTrap(returnCode);
}
returnCode = pSetLock( &ssdConfig, LOCK_LOW_SECONDARY, (blkLockState & 0xFFFFFF00), FLASH_SLMLR_PASSWORD);
if ( C90FL_OK != returnCode )
{
ErrorTrap(returnCode);
}
Best Regards
Erwan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-09-29 07:05 AM
Hello Marcus ,
no issue has been noticed
Have you checked SPC563Mxx_RLA Flash Test Application for Discovery in SPC5Studio Tools Suite or RM0015 ?
/*==================== Lock to Protect Shadow Row ====================*/
returnCode = pSetLock( &ssdConfig, LOCK_SHADOW_PRIMARY, 1, FLASH_LMLR_PASSWORD );
if ( C90FL_OK != returnCode )
{
ErrorTrap(returnCode);
}
returnCode = pSetLock( &ssdConfig, LOCK_SHADOW_SECONDARY, 1, FLASH_SLMLR_PASSWORD );
if ( C90FL_OK != returnCode )
{
ErrorTrap(returnCode);
}
/*====== Unlock all blocks in low address space ======*/
returnCode = pGetLock( &ssdConfig, LOCK_LOW_PRIMARY, &blkLockEnabled, &blkLockState );
if ( C90FL_OK != returnCode )
{
ErrorTrap(returnCode);
}
returnCode = pSetLock( &ssdConfig, LOCK_LOW_PRIMARY, (blkLockState & 0xFFFFFF00), FLASH_LMLR_PASSWORD);
if ( C90FL_OK != returnCode )
{
ErrorTrap(returnCode);
}
returnCode = pGetLock( &ssdConfig, LOCK_LOW_SECONDARY, &blkLockEnabled, &blkLockState );
if ( C90FL_OK != returnCode )
{
ErrorTrap(returnCode);
}
returnCode = pSetLock( &ssdConfig, LOCK_LOW_SECONDARY, (blkLockState & 0xFFFFFF00), FLASH_SLMLR_PASSWORD);
if ( C90FL_OK != returnCode )
{
ErrorTrap(returnCode);
}
Best Regards
Erwan