Skip to main content
Senior
August 22, 2024
Question

TIMER Interrupt and Other Interrupt

Hello All, 

I am progressing toward my goal. 

I am bit banging a GPIO port every 2 uS based on a Byte buffer. I can not use SPI because I need to send a predefine number of bit that is not 8 aligned. 

So I use a timer and every UIF event I reset the GPIO and every CC2F I set or not based on the bit.

Everything is almost working well except that using a logic analyser I have time to time delay in the bit banging. 

I think it is due to other interrupts, I have already disabled the DMA and the SDIO but still I have delay. 

I am using VSCode on Mac with CubeMX, how could I know which interrupt is causing delay 

 

Except disabling one by one, I do not see how to do it 

Thanks 

Vincent 

 

This topic has been closed for replies.

8 replies

TDK
August 22, 2024

> how could I know which interrupt is causing delay 

Look at the interrupts you have enabled which are same or higher priority than the one you process UIF in. Probably SysTick is causing it.

"If you feel a post has answered your question, please click ""Accept as Solution""."
vbessonAuthor
Senior
August 22, 2024

Well systick has a priority of 15 and my TIMER a priority of 0 

so It might be something else

 

TDK
August 22, 2024

A priority of 0, although numerically lower, is a higher priority than 15. That's it. Swap them.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Andrew Neil
Super User
August 22, 2024

@vbesson wrote:

I can not use SPI because I need to send a predefine number of bit that is not 8 aligned. 


You might still be able to use SPI - just set the excess bits to whatever the line idle state is ...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.