AnsweredAssumed Answered

Why would a DSB instruction never complete?

Question asked by Chris Cowdery on Jul 15, 2020
Latest reply on Aug 3, 2020 by Kerry Zhou

Hi All,

MIMXRT1021DAF5A, IAR compiler, FreeRTOS, code in Serial Flash (SQPI)

 I have a DSB instruction that never completes. This causes a processor 'lockup'. This is the sequence of events:

1. Code executing normally

2. SysTick interrupt occurs.

3. System 'stops'. (I do not know why it stops - I guess the pipeline has just fetched the DSB instruction)

4. Using J-Link Commander, I 'halt' and read register contents. I can confirm PC = first instruction of SysTick handler. Stack & registers OK, and consistent.

5. Using J-Link Commander, I 'single step' :

6. PUSH {R7,LR} - OK

7. MOVS R0,#32 - OK

8. MSR BASEPRI,R0 - OK

9. DSB #15 - Any J-Link Commander command after this reports 'CPU is not halted!'. Trying to 'halt' the CPU says 'WARNING: CPU could not be halted'

 

I think this means the DSB instruction never completed. I think the CPU is waiting for an input to allow DSB to complete which never comes.

 

Why would a DSB instruction never complete?

 

Thanks,

 

Chris.

Outcomes