Hardware Peripheral Write using Address

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Hardware Peripheral Write using Address

967件の閲覧回数
athmesh_n
Contributor IV

I'm working on MODBUS protocol, where I have to write to pin using address given by master. Is it possible to write to a peripheral using peripheral address?

IDE: MCUXpresso

Controller : LPC1517

Brief:

I would like to write to GPIO PIN PIO1_0, whose byte address is 0x1c000020. So, in order to make the pin high, should I write to address 0x1c000020? I tried using the following code: 

 uint8_t volatile *gpio = (uint8_t *)0x1c000020;
 *gpio = 0x1;

Is it possible to do so?a

ラベル(1)
タグ(3)
0 件の賞賛
返信
2 返答(返信)

856件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ATHMESH NANDAKUMAR ,

Yes, you can.

Do you have any problem when you using it ?


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

856件の閲覧回数
athmesh_n
Contributor IV

No I used a different method

0 件の賞賛
返信