Hardware Peripheral Write using Address

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

Hardware Peripheral Write using Address

679 Views
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

Labels (1)
Tags (3)
0 Kudos
2 Replies

568 Views
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 Kudos

568 Views
athmesh_n
Contributor IV

No I used a different method

0 Kudos