URL
https://opencores.org/ocsvn/neorv32/neorv32/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 60 |
Rev 62 |
Line 70... |
Line 70... |
|
|
// capture all exceptions and give debug info via UART
|
// capture all exceptions and give debug info via UART
|
// this is not required, but keeps us safe
|
// this is not required, but keeps us safe
|
neorv32_rte_setup();
|
neorv32_rte_setup();
|
|
|
|
// use UART0 if implemented
|
|
if (neorv32_uart0_available()) {
|
// init UART at default baud rate, no parity bits, ho hw flow control
|
// init UART at default baud rate, no parity bits, ho hw flow control
|
neorv32_uart_setup(BAUD_RATE, PARITY_NONE, FLOW_CONTROL_NONE);
|
neorv32_uart0_setup(BAUD_RATE, PARITY_NONE, FLOW_CONTROL_NONE);
|
|
|
// check available hardware extensions and compare with compiler flags
|
// check available hardware extensions and compare with compiler flags
|
neorv32_rte_check_isa(0); // silent = 0 -> show message if isa mismatch
|
neorv32_rte_check_isa(0); // silent = 0 -> show message if isa mismatch
|
|
|
// say hello
|
// say hello
|
neorv32_uart_print("PWM demo program\n");
|
neorv32_uart0_print("PWM demo program\n");
|
|
}
|
|
|
|
|
// deativate all PWM channels
|
// deactivate all PWM channels
|
neorv32_pwm_set(0, 0);
|
neorv32_pwm_set(0, 0);
|
neorv32_pwm_set(1, 0);
|
neorv32_pwm_set(1, 0);
|
neorv32_pwm_set(2, 0);
|
neorv32_pwm_set(2, 0);
|
neorv32_pwm_set(3, 0);
|
neorv32_pwm_set(3, 0);
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.