K40 FOR IAR

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

K40 FOR IAR

1,152 次查看
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 项奖励
回复
1 回复

978 次查看
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 项奖励
回复