This should be easy, but I must have missed something. I’m using a LoFive dev board and trying to get started by flashing an LED. Actually that’s one step ahead of where I am, I’m trying to drive a pin, GPIO5 of the device, High. That might be something as minimal as:
#define OUTPUT_ENABLE 0x08 #define OUTPUT_PORT 0x0C #define GPIO_BASE 0x10012000 uint32_t *output_enable = (uint32_t *)GPIO_BASE + OUTPUT_ENABLE; uint32_t *output_port = (uint32_t *)GPIO_BASE + OUTPUT_PORT; *output_enable = 0x01 << 5; *output_port = 0x01 << 5; while(1);
But it’s not. All I have is the GPIO section of the Manual but that’s not going into too much depth. For example when a pin is configured as an Output pin it has a configurable drive strength, but all the manual has is:
17.5 Drive Strength When configured as output, each pin has a SW-controllable Drive Strength.
Perhaps the Pin’s Hardware Function is enabled by default? I’ll try mess with that register…
I’ll try to set the Drive Strength of the pin…
Nagh I’m only guessing here. Is there a parent manual which I’m missing for the whole RISC-V arch which has all the options, which that FE310 manual inherits from? Thanks for any help and apologies if I’ve missed something.