TIMER Interrupt and Other Interrupt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-22 1:36 PM
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
- Labels:
-
Interrupt
-
STM32F4 Series
-
TIM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-22 2:15 PM
> 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-22 2:46 PM
Well systick has a priority of 15 and my TIMER a priority of 0
so It might be something else
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-22 3:38 PM
@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 ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-22 4:25 PM
A priority of 0, although numerically lower, is a higher priority than 15. That's it. Swap them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-22 9:38 PM
0 is the timer and 15 is the systick so normally the timer will preempt and be executed with no delay right even on systick interrupt ? Wdyt. ?
andrew the spi use D a circular buffer how do you send let say 129 bits without 7 zero padding ?
thanks
vincent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-23 2:18 AM
@vbesson wrote:how do you send let say 129 bits without 7 zero padding ?
You don't have to zero pad - you could pad with ones instead.
whatever is the line idle state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-23 3:02 AM
Well, I do not think it will work because, I am building a floppy simulator and data sector can be across the the end of the beginning of the circular buffer and the bit number is really important,
At the end of the buffer I can not add any bits to pad a non 8 bits Bytes, this is why I am using bit banging.
If you have better approach. (Btw I solved my interrupt issue)
Vincent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-23 6:37 AM
> 0 is the timer and 15 is the systick so normally the timer will preempt and be executed with no delay right even on systick interrupt ? Wdyt. ?
You are correct. I misread. You can still get jitter of a few cycles, but shouldn't be at play here.
