2018-04-17 04:18 AM
Hello.
At page 212 in the manual RM0008 for the STM32F103 device, some part of the internal/software event is explained. Under the EXTI_PR it states, this bit is cleared by writing a '1'into the bit. But just above it says 1 = trigger occurred = bit is set ??? I am confused.
I do follow the part of setting up pins and level detections, but set/reset part of SWIER and PR confuses a bit
:)
???BRGDs
Klavs.
2018-04-17 09:42 AM
Hardware sets the EXTI_PR bits so that you can read 1 out from them.
By software, the bits you write 1 into them get cleared, so you can read 0 out of them.
Think of 20 R-S flip-flops; with the S line of each flip-flop tied to the internal hardware detecting the edge; the R line tied to outputs 0..19 of a multibit gate which opens from the common bus when the address decoder detects write to the register's address; and the outputs of latches connected to inputs of the gate opening to the common bus when the address decoder detects read from the register's address.
JW
2018-04-18 01:41 AM
Just to confirm, but like this ?
2018-04-18 02:30 AM
Yes, with a few minor corrections:
JW
2018-04-18 02:55 AM
Thank You That drawing is 4.000.000.000 times easier to understand than the text in RM0008
:)
.