URL
https://opencores.org/ocsvn/neo430/neo430/trunk
Subversion Repositories neo430
Compare Revisions
- This comparison shows the changes necessary to convert path
/neo430/trunk
- from Rev 180 to Rev 181
- ↔ Reverse comparison
Rev 180 → Rev 181
/neo430/sw/bootloader/bootloader.c
135,7 → 135,7
neo430_uart_char_read(); // clear UART RX buffer |
|
// set SPI config: |
// enable SPI, no IRQs, MSB first, 8-bit mode, SPI clock mode 0, set SPI speed, disable all 6 SPI CS lines (set high) |
// enable SPI, no IRQ, MSB first, 8-bit mode, SPI clock mode 0, set SPI speed, disable all SPI CS lines (set high) |
neo430_spi_enable(SPI_PRSC_64); // this also resets the SPI module |
neo430_spi_trans(0); // clear SPI RTX buffer |
|
/neo430/sw/example/coremark/core_portme.c
69,7 → 69,7
or zeroing some system parameters - e.g. setting the cpu clocks cycles to 0. |
*/ |
void start_time(void) { |
neo430_timer_start(); |
neo430_timer_run(); |
//GETMYTIME(&start_time_val ); |
} |
/* Function : stop_time |
/neo430/sw/example/trng_test/main.c
19,7 → 19,7
// # You should have received a copy of the GNU Lesser General Public License along with this # |
// # source; if not, download it from https://www.gnu.org/licenses/lgpl-3.0.en.html # |
// # ********************************************************************************************* # |
// # Stephan Nolting, Hannover, Germany 09.01.2020 # |
// # Stephan Nolting, Hannover, Germany 06.02.2020 # |
// ################################################################################################# |
|
|
30,7 → 30,7
// Configuration |
#define BAUD_RATE 19200 |
#define NUM_SAMPLES 2000000000 |
#define TRNG_TAP_MASK 0b01010001000000 |
#define TRNG_TAP_MASK 0b01010001000000 // highly experimental! |
|
// Global variables |
uint32_t rnd_hist[256]; |
/neo430/sw/lib/neo430/source/neo430_uart.c
19,7 → 19,7
// # You should have received a copy of the GNU Lesser General Public License along with this # |
// # source; if not, download it from https://www.gnu.org/licenses/lgpl-3.0.en.html # |
// # ********************************************************************************************* # |
// # Stephan Nolting, Hannover, Germany 17.01.2020 # |
// # Stephan Nolting, Hannover, Germany 06.02.2020 # |
// ################################################################################################# |
|
#include "neo430.h" |
75,6 → 75,35
|
|
/* ------------------------------------------------------------ |
* INFO Get current UARt baud rate |
* ------------------------------------------------------------ */ |
uint32_t neo430_uart_get_baudrate(void) { |
|
// Clock speed |
uint32_t clock = CLOCKSPEED_32bit; |
|
// prescaler |
uint16_t prsc; |
switch ((UART_CT >> 8) & 0x0007) { |
case 0: prsc = 2; break; |
case 1: prsc = 4; break; |
case 2: prsc = 8; break; |
case 3: prsc = 64; break; |
case 4: prsc = 128; break; |
case 5: prsc = 1024; break; |
case 6: prsc = 2048; break; |
case 7: prsc = 4096; break; |
default: prsc = 0; break; |
} |
|
uint16_t baud = UART_CT & 0x00FF; |
uint32_t baud_value = clock / (uint32_t)(prsc * baud); |
|
return baud_value; |
} |
|
|
/* ------------------------------------------------------------ |
* INFO Send single char via internal UART |
* PARAM c char to send |
* ------------------------------------------------------------ */ |