Bootloader and DMA

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
panda
Level 1
Level 1
5 sign-ins 5 replies posted Welcome!

Hi everyone,

We currently develop a Project (TC38A), which uses Qspi module with DMA configuration. The Qspi modul could run well, when we flash the software trough the UDE debugger directly. We have also developed an Bootloader for our project, which also is working well. When we flash the Application SW through the  the Bootloader SW all periphariel moduls are working well except Qspi module which configurated with the DMA modul. There is no trap alert or the code doesn't stop any where. But in our tests, we saw the Qspi module with DMA configuration do not make measurements. It seems to be that the DMA couldn't be initialised.

some more informations:

- the Bootloader uses some QSPI modules but not the same module with  Application SW. The used Qps Modules are not configurated with DMA

- The Bootloader runs only on one core and other cores are not started.

Thank in  advance for any suggestion or solution advice

Best regards

 

 

 

0 Likes
5 Replies
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked

Hi Panda,

very interesting. So, if I got that right, you only have problems with the QSPI while using your own Bootloader implementation. Could you provide a little bit more information on your timing? I assume you trigger your Bootloader externally over QSPI and try to restart your program right after it, which then configures a bunch of peripherals including QSPI to work with.  A good way figuring out what happens is to make a flash dump after using UDE and after utilizing your own Bootloader implementation. Booth dumps should be equal. If not, you have obviously a problem in your Bootloader implementation. BTW, are you using SWAP functionality on your TC? The problem with self-made Bootloaders are mostly related to race conditions to the PFLASH for example during WRITE. If those conditions occur, some BYTEs could be corrupted. For this you should do the dump approach first.

Best regards,

TBencher

0 Likes
panda
Level 1
Level 1
5 sign-ins 5 replies posted Welcome!

Hi TBencher,

Thank you for your reply. The problem occurs also when i flash both the bootloader and the application software with UDE debugger. What do you mean with SWAP functionality?

I have acutally two different software as application; one of them is running as barematel and i dont have any problems there. But the other one has an OS which is PXROS. When i flash the application with PXROS, then the problem occurs.

The bootloader it self is an UDS Bootloader; when i Flash my Application over CAN interfaces and over The UDE debugger, the image of the software within the memory are the same.

Best regards

Panda

 

0 Likes
Nambi
Moderator
Moderator
Moderator
50 likes received 5 likes given 100 solutions authored

Hi,

Could you check if the SPI service requests are properly mapped to the type of service and the required DMA service providers when you use the OS?

Best Regards.

0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked

Hi Panda,

so you mean problems just occur if PXROS is on board. Unfortunately, we don't have any experience with PXROS. 

---------very good explanation from Lauterbach for SWAP------------------------

The basic idea of SWAP is to split the PFLASH into two groups of banks, “A” and “B”, allowing the application to program a new version to the inactive banks while the current version of the application is executing from the active banks. When programming has been completed, the banks are switched. After the next reboot of the chip, the previously inactive banks will become the active banks and the new version of the application will start. The SWAP mechanism ensures that the application will always execute from the same addresses, no matter which physical banks it was programmed to.

When SWAP is enabled, a chip-internal remapping redirects all read-and-fetch accesses to the active address map while the FLASH programming operations (erase/write) keep using the physical system address of PFLASH.

------------------------------------

So, it seem your PXROS somehow interferes with your Bootloader.

 

Best regards,

TBencher

0 Likes
User17320
Level 1
Level 1
First like given 10 sign-ins First question asked

I  have also the same problem. The register value for DMA Channel for QSPi could not be set. It seems to be a common issue in Aurix.

0 Likes