When I put the code of DSPI-send into the STM interrupt, the DSPI communication cannot be sent.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

When I put the code of DSPI-send into the STM interrupt, the DSPI communication cannot be sent.

706 Views
Hanry
Contributor I

Question description

    When I put the code of DSPI send in the While loop, the DSPI communication sends normally. But when I put the code into the STM interrupt, the DSPI communication cannot be sent.

In While loop:

Hanry_0-1647405650896.png

 

Hanry_1-1647405671151.png

In STM interrupt:

Hanry_2-1647405691975.png

 

Hanry_3-1647405708462.png

The program is stuck in this function:

Hanry_4-1647405743442.png

 

Hanry_5-1647405750378.png

The program is attached below.

Don't know what the problem is. Thank you for your help.

0 Kudos
4 Replies

692 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

try to increase interrupt priority for used DSPI module.

BR, Petr

0 Kudos

682 Views
Hanry
Contributor I

Thanks for your direction. But how to increase interrupt priority for used DSPI module?

Looking forward to your specific guidance.

Hanry_0-1647487099598.png

Hanry_1-1647487119290.png

 

0 Kudos

675 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

use

DSPI_MasterSetDelay(DSPI0_INSTANCE, 1, 1, 1);
INT_SYS_SetPriority(DSPI0_TxFifoNotfull_IRQn,5);
INT_SYS_SetPriority(DSPI0_RxFifoNotempty_IRQn,5);

BR, Petr

0 Kudos

667 Views
Hanry
Contributor I

Thanks for your direction. Best wishes for you.

0 Kudos