Link to home
Start Free TrialLog in
Avatar of naseeam
naseeamFlag for United States of America

asked on

How to configure Digital Ouput in Renesas RH850/FIL Micrcontroller ?

I need to configure pin AP0_14 for digital output.  To achieve this I need to write 0 to bit 14 of 16-bit Port Mode Register.


The physical address of this register is:   0xFFC103C8


What should be the exact statement to write to this register using the physical address ?
Renesas-RH850FIL.pdf
Avatar of naseeam
naseeam
Flag of United States of America image

ASKER

Please see section 2.9.2.4 in attached manual.
ASKER CERTIFIED SOLUTION
Avatar of sarabande
sarabande
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
correction:

*pus = (*pus & 0x8000) | (bits0_14 & 0x7FFF);

Open in new window


Sara
Avatar of naseeam

ASKER

This is embedded software application.

Don't I need volatile keyword ?
volatile makes that in a multi-threaded application each thread doesn't make optimization on  a variable, since it could be changed by another thread. for example in a loop the variable was checked in the loop condition even if there was no change in the loop body. 'embedded' software is realtime and single-threaded as far as i know. so the volatile shouldn't make a difference. but it also may not harm (and perhaps my knowledge of 'embedded' systems is not up-to-date).

Sara