Hi everyone,
I have a question about the source code of "QSPI_v1.c".
My software:
- processor_sdk_rtos_am437x_5_01_00_11
- C:\ti\pdk_am437x_1_0_12\packages\ti\drv\spi\src\v1\QSPI_v1.c
The following code is around line 877 of this source code.
if(wordLenBytes <= 4U)
{
/* Formulate the 32 bit word to write to data register */
for(idx = 0U; idx < wordLenBytes; idx++)
{
dataVal[0] |= (((uint32_t)(*srcAddr) << (8u - (8u * (idx + 1u)))));
srcAddr++;
}
numWords = 1U;
}
In this source code, I think that it does not work if wordLenBytes is not 0.
Because (8u - (8u * (idx + 1u) is negative.
Is this source code incorrect?
Please let me know if you have the correct code.
Best regards,
Sasaki