Other Parts Discussed in Thread: NOWECC
Hi.
This is a continuation of one of my previous posts, but since the previous was some time ago I decided to open a new one. Old post was https://e2e.ti.com/support/microcontrollers/hercules/f/312/t/435825.
MCU: TMS570LS0332APZQQ1
Explanation of the problem:
When running the firmware code on the MCU two errors appear seemingly random in the registers (running the same code with same settings, for example just power restarting leads to the the error at different times).
There are two error codes in the registers of error signaling module (ESM): ESMSR1=0x40 and ESMSR3=0x80. When looking at the error channel table it seems that the 0x40=FMC - corrrectable error bus1 and bus 2 interfaces and 0x80=FMC - uncorrectable error bus 1 and bus 2 interfaces. The both codes seem to be coming at the same time.
As suggested in the previous post by Sunil Oak I checked the FCOR_ERR_ADDR register which holds value of 0x38 after the errors are encountered. After making breakpoints at the ISR that detects the error and continuing line after line the error usually exits at function that looks as follows:
/**********************************************************************************************************************
* binary_to_ascii_hex
*********************************************************************************************************************/
/*! converts uint to char representation in hexadecimal format
*
* \param [out] buffer pointer to buffer to hold the ascii characters
* \param [in] value the number to convert to ascii
* \param [in] min_digit_count minimum count of numbers that needs to be output. will be trailing zeros if number is not big enough
* \retval number of digits
*********************************************************************************************************************/
static uint32_t binary_to_ascii_hex (char* buffer, uint32_t value, uint32_t min_digit_count)
{
uint8_t digits = 0U;
uint32_t divisor = 0x10000000U;
bool trailing = false;
char temp = 0U;
uint32_t count = 0U;
for (digits = 0U; digits < BUFFER_ENTRY_MAX_HEX_DIGIT_COUNT; digits++)
{
temp = (char)(value / divisor);
if ((temp > 0U) || (trailing == true) || (min_digit_count == (BUFFER_ENTRY_MAX_HEX_DIGIT_COUNT - digits)))
{
if (temp > 9U)
{
temp = temp - 10U + 'A';
}
else
{
temp = temp + ASCII_ZERO;
}
*buffer = temp;
trailing = true; //first actual digit reached
buffer++;
count++;
}
value = value % divisor;
divisor = divisor / 0x10U;
}
return count;
}
Exit point is on line value=value%divisor;
These errors do not seem to impact the functionality of the executing firmware in any way that I have discovered.
I am looking for a solution how to find the cause for the errors and to get rid of them.