NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
main.c File Reference

Simple core local interruptor (CLINT) usage example. More...

#include <neorv32.h>

Macros

#define BAUD_RATE   19200
 

Functions

void mti_irq_handler (void)
 
void msi_irq_handler (void)
 
int main ()
 

Variables

const char weekdays [7][4] = {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"}
 

Detailed Description

Simple core local interruptor (CLINT) usage example.

Author
Stephan Nolting

Function Documentation

◆ main()

int main ( void )

This program toggles an LED at GPIO.output(0) at 1Hz and also prints and updates the Unix time in human-readable format using the machine timer interrupt.

Note
This program requires the CLINT to be synthesized (and UART0 and GPIO).
Returns
Should not return.

◆ msi_irq_handler()

void msi_irq_handler ( void )

Machine software IRQ handler.

Warning
This function has to be of type "void xyz(void)" and must not use any interrupt attributes!

◆ mti_irq_handler()

void mti_irq_handler ( void )

Machine timer IRQ handler.

Warning
This function has to be of type "void xyz(void)" and must not use any interrupt attributes!