attachinterrupt issue on STM32F412VG

Post here first, or if you can't find a relevant section!
Post Reply
somanshraj
Posts: 5
Joined: Sat Apr 03, 2021 3:03 pm

attachinterrupt issue on STM32F412VG

Post by somanshraj »

The variant used is custom using the following : STM32F412VG

While trying to use attachinterrupt on Pin PA2, output shows 4 times the number of interrupts expected ( in case of RISING, FALLING or CHANGE )

https://pasteboard.co/JX72fyr.jpg

As seen in the above attached link ( also attached as custom board), we expect nine interrupts but on analyzing we get 37 as shown on right side.

Now, on changing the board to blackpill, doing the same as above correctly outputs the number of interrupts as seen in the below attached link ( also attached as blackpill ). Variant used here is predefined.

https://pasteboard.co/JX72Z5J.jpg

update : using interrupt on PA9 instead of PA2 outputs the correct value

Any hints or tips which might fix the issue. Also the variant board is attached. This is the same variant used in the following post : viewtopic.php?f=7&t=993

@fpiSTM
Attachments
custom board.jpg
custom board.jpg (38.26 KiB) Viewed 1794 times
blackpill.jpg
blackpill.jpg (38.24 KiB) Viewed 1794 times
Generic_F412Vx.zip
(8.68 KiB) Downloaded 139 times
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: attachinterrupt issue on STM32F412VG

Post by fpiSTM »

Hard to tell with those information.
If it works with a blackpill I guess it is link to your hardware.
ag123
Posts: 1653
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: attachinterrupt issue on STM32F412VG

Post by ag123 »

among the things to check, is if the cpu and buses are running at the intended speeds as given on the specs sheets?
and if they are the other thing would be the prescaler settings say on timers etc.
the crystal frequency, and pll multipliers/dividers are often a spot to check if after all the cpu and buses are not running at the correct speeds.
Post Reply

Return to “General discussion”