We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, I am new to ARM (usually work with 8051), and am working on a little RS232 GPIO board. Project is a serial input on port 3 (uart 1) takes 3 bytes in and writes the values to ports 0-2, and 4-9.
The program seems to be working fine on ports 4,7,8 and 9. On the other ports the direction registers seem to be stuck as inputs. in my main routine I have lines to configure all the ports as outputs:
SCU->GPIOOUT[0] = 0x5555; GPIO0->DDR = 0xFF; "" "" SCU->GPIOOUT[9] = 0x5555; GPIO9->DDR = 0xFF;
When I stop the program and look at the output registers the GPIO_DIR[x] registers stay at 0x00 on ports 0,1,2,3 5 and 6.
I tried single step through my startup configuration code and the direction registers never change. Is there something I am missing for using these ports as outputs?
Thanks, Andrew
Just an update:
I made sure the GPIO ports were getting clocked in the startup file:
CLOCK_SETUP EQU 1 SCU_CLKCNTR_Val EQU 0x00020000 SCU_PLLCONF_Val EQU 0x000BC019 SCU_PCGR0_Val EQU 0x000004FB SCU_PCGR1_Val EQU 0x00FFC00B
the PCGR1 register is set to 0x00FFC00B, so all the IO ports and the uart0 should be getting clocked. Im really stuck here as to why its not working unless there is some other register I am missing. Like I said I am new to ARM, so I would appreciate any input.