[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Newbie -- Accessing Hardware Ports
- Date: Tue, 4 Feb 2003 14:50:05 -0500
- From: donp_news at glasscity.net (Don)
- Subject: Newbie -- Accessing Hardware Ports
Okay, I have managed to get 'hello world' to work under both psim and
on a PPC2A using the ppcn_60x BSP. Now I am trying to branch out and
exercise the board by flashing some LEDs. Code snip looks something
volatile unsigned8 *pLED_Control;
pLED_Control = (unsigned8 *) 0x00000860;
*pLED_Control = 0x0F;
/** wait loop **/
*pLED_Control - 0x00; /** LEDs should blink on & off **/
Unfortunately, nothing happens. I have also tried reading some board
configuration locations (8-bit) and got back values that are no where
near what they should be.
Now I have concluded the problem is one of the following, but have not
been able to find documentation to support or refute the position:
1) RTEMS does not allow direct manipulation of hardware ports via
pointers. (But there has got to be a way around this as the COM port
2) That region of memory is being cached. In which case I need to
figure out how to access the hardware registers to keep that region
from being cashed.
3) I have screwed up basic C code.
4) There is a board configuration problem.
Anybody willing to hazard a guess as to which is the most likely