2019-03-14 03:21 PM
I have been implementing firmware for STM32F042 and used the Std Peripheral library (v.1.5.0). I found the following bug(s):
Bug: DMA1_Channel4_5_IRQn() was never called
In file Libraries/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h
Line 5558:
#define DMA1_Channel4_5_IRQn DMA1_Channel4_5_6_7_IRQn
Line 5569:
#define DMA1_Channel4_5_IRQHandler DMA1_Channel4_5_6_7_IRQHandler
Possible fix: remove lines 5558 and 5569.
Minor issue: unused CANx generates warning
In file: Libraries/STM32F0xx_StdPeriph_Driver/src/stm32f0xx_can.c
Add following code to line 157:
/* Unused CANx */
(void)(CANx);
Resetting register in a confusing way
In file: Libraries/STM32F0xx_StdPeriph_Driver/src/stm32f0xx_can.c
Line 585: CANx->sTxMailBox[transmit_mailbox].TIR &= TMIDxR_TXRQ;
Why don't simply assigning "TIR=0x00"? It's a bit confusing the usage of TMIDxR_TXRQ (=0x01) in this line. Of course, at that point TXRQ bit is set to 0, thus the result is TIR=0x00.
Marco
2019-03-14 03:29 PM
Ok, and was that because it wasn't in the vector table, or that nothing enabled triggered it?
You're going to have to provide a worked example if you want people to review or fix things.
2019-03-14 04:05 PM
I had accidentally posted the post while still editing it.
2019-03-18 07:39 PM
Hi @Community member ,
Do you reckon my description is not enough? Should I add code?