K40 FOR IAR

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

K40 FOR IAR

1,088 Views
WayneChung
Contributor I

I use the IAR ARM sample example,

 

when i set "GPIOC_PSOR = 1" ,

 

the Register will set to "GPIOC_PDORC = 1" .

 

0 Kudos
Reply
1 Reply

914 Views
mjbcswitzerland
Specialist V

Hi

 

This sounds to be normal operation. GPIOC_PSOR is the Set Output Register, causing the bit with '1' to be set to the output; the register itself always reads 0.

Since the write set the bit in the output, this is seen in the GPIOC_PDORC register.

 

By contrast, if you write "GPIOC_PCOR = 1" it will then clear the bit in the GPIOC_PDORC register.

Furthermore "GPIOC_PTOR = 1" will toggle the bit.

 

 

Regards

 

Mark

 

0 Kudos
Reply