1/1

|
ORPSoC GPIO
by FNolte on Jun 26, 2013 |
FNolte
Posts: 9 Joined: Jul 5, 2012 Last seen: Jan 15, 2014 |
||
|
Hi, I want to test the GPIO in simulation but I am not sure how to write a program to toggle the GPIO outputs. I don't see any drivers for it and no example code either. Could someone point me in the right direction if I missed it, or just post some example code or pointers for that?
I am working with the actel ordb1a3pe1500 board (the same FPGA but on a custom board) Thanks in advance for any help. Regards Francois |
|||
|
RE: ORPSoC GPIO
by FNolte on Jun 26, 2013 |
FNolte
Posts: 9 Joined: Jul 5, 2012 Last seen: Jan 15, 2014 |
||
|
Nevermind, I managed to get it working with the following code:
REG8(GPIO_0_BASE) = 0x01; REG8(GPIO_0_BASE + 1) = 0x01; I guessed that would be the right thing to do by looking at the verilog code, and it worked. Just for completion and in case someone else also doesn't know how this works, I simply added those lines in the uart-simple.c test code to see if the GPIO line responds as expected. void hello_from_uart(int uart_core) { uart_init(uart_core); REG8(GPIO_0_BASE) = 0x01; REG8(GPIO_0_BASE + 1) = 0x01; printf("\n\tHello world from UART%d \n", uart_core); } |
|||
1/1

