readFlashDataPage in loader

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Found the following comment from Larry using my black belt in Google-fu:

https://www.xcore.com/viewtopic.php?t=3438

Code: Select all

https://www.xcore.com/viewtopic.php?t=3438


User avatar
RedDave
Experienced Member
Posts: 77
Joined: Fri Oct 05, 2018 4:26 pm

Post by RedDave »

That is sort of useful, through the findings are not quite the same.

1) My code works in init().
2) I do not have reversed bit order but reversed nybble order in each byte.
3) Offset is not in words.

If we consider that the Endedness that results from reading in the application is the opposite to that read in from the loader, then we need to reverse the byte order to correct that.
This results in a complete nybble reversal.
i.e. 12345678 becomes 87654321.

If Larry was using a single line SPI and so reading one bit at the time, and I am using a quad flash then this would make some sense.

I think I can live with this. I will write some code to reverse the nybble order and I am good.

This is still all confusing, since reversed bit or nybble order should not be a thing. The code to read to SPI flash should sort this.
Post Reply