diff --git a/rtl/top_templates/neo430_top_avm.vhd b/rtl/top_templates/neo430_top_avm.vhd index 5e643b9..566bc1e 100644 --- a/rtl/top_templates/neo430_top_avm.vhd +++ b/rtl/top_templates/neo430_top_avm.vhd @@ -231,7 +231,7 @@ begin spi_mosi_o <= std_logic(spi_mosi_o_int); spi_cs_o <= std_logic_vector(spi_cs_o_int); ext_ack_o <= std_logic_vector(irq_ack_o_int); - timer_fg_o <= std_logic(freq_gen_o_int); + freq_gen_o <= std_logic(freq_gen_o_int); -- Wishbone-to-Avalon Bridge ------------------------------------------------ diff --git a/rtl/top_templates/neo430_top_axi4lite.vhd b/rtl/top_templates/neo430_top_axi4lite.vhd index f96bccf..feef42e 100644 --- a/rtl/top_templates/neo430_top_axi4lite.vhd +++ b/rtl/top_templates/neo430_top_axi4lite.vhd @@ -236,7 +236,7 @@ begin spi_mosi_o <= std_logic(spi_mosi_o_int); spi_cs_o <= std_logic_vector(spi_cs_o_int); ext_ack_o <= std_logic_vector(irq_ack_o_int); - timer_fg_o <= std_logic(freq_gen_o_int); + freq_gen_o <= std_logic(freq_gen_o_int); -- Wishbone-to-AXI4-Lite-compatible Bridge ---------------------------------- diff --git a/rtl/top_templates/neo430_top_std_logic.vhd b/rtl/top_templates/neo430_top_std_logic.vhd index e01aa53..98866f9 100644 --- a/rtl/top_templates/neo430_top_std_logic.vhd +++ b/rtl/top_templates/neo430_top_std_logic.vhd @@ -218,7 +218,7 @@ begin wb_stb_o <= std_logic(wb_stb_o_int); wb_cyc_o <= std_logic(wb_cyc_o_int); ext_ack_o <= std_logic_vector(irq_ack_o_int); - timer_fg_o <= std_logic(freq_gen_o_int); + freq_gen_o <= std_logic(freq_gen_o_int); end neo430_top_std_logic_rtl; diff --git a/sw/example/timer_simple/main.c b/sw/example/timer_simple/main.c index afd0906..8883ed0 100644 --- a/sw/example/timer_simple/main.c +++ b/sw/example/timer_simple/main.c @@ -86,26 +86,10 @@ int main(void) { // enable global IRQs neo430_eint(); - - // test frequency generator - neo430_timer_nco_enable(); - uint32_t nco_target_frequency = 0, nco_real_frequency; - while(1) { - neo430_uart_br_print("Target freq.: 0x"); - neo430_uart_print_hex_dword(nco_target_frequency); - - nco_real_frequency = neo430_timer_nco_set(nco_target_frequency); - - neo430_uart_br_print(", Real freq.: 0x"); - neo430_uart_print_hex_dword(nco_real_frequency); - neo430_uart_br_print("\n"); - - nco_target_frequency++; // go through all possible frequencies - neo430_cpu_delay_ms(250); // wait 250ms + neo430_sleep(); } - return 0; }