diff options
author | jaseg <git@jaseg.de> | 2023-10-02 14:50:03 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2023-10-02 14:50:03 +0200 |
commit | 8e42ca09787ab7698a068df71e37f388ca1b2e9f (patch) | |
tree | 3982eb94858ed6e76d4ead4c50714b732f265a0a /driver_fw | |
parent | 72cffd586a7d2cd20bd8256a920b2caac8c7db85 (diff) | |
download | 8seg-8e42ca09787ab7698a068df71e37f388ca1b2e9f.tar.gz 8seg-8e42ca09787ab7698a068df71e37f388ca1b2e9f.tar.bz2 8seg-8e42ca09787ab7698a068df71e37f388ca1b2e9f.zip |
Transmission works including sync and whitening
Diffstat (limited to 'driver_fw')
-rw-r--r-- | driver_fw/.gdbinit | 7 | ||||
-rw-r--r-- | driver_fw/src/main.c | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/driver_fw/.gdbinit b/driver_fw/.gdbinit index d29f9a6..a8b0d69 100644 --- a/driver_fw/.gdbinit +++ b/driver_fw/.gdbinit @@ -8,7 +8,7 @@ set print elements 512 # Convert GDB to interpret in Python python -import os,subprocess,sys +import os, subprocess, sys # Execute a Python using the user's shell and pull out the sys.path (for site-packages) paths = subprocess.check_output('python -c "import os,sys;print(os.linesep.join(sys.path).strip())"',shell=True).decode("utf-8").split() # Extend GDB's Python's search path @@ -18,3 +18,8 @@ end source ~/ref/PyCortexMDebug/cmdebug/svd_gdb.py svd_load ~/ref/stm32square/svd/STM32G070.svd +define reconnect + disconnect + target extended-remote 192.168.1.95:2022 +end + diff --git a/driver_fw/src/main.c b/driver_fw/src/main.c index 136e0c7..b338a98 100644 --- a/driver_fw/src/main.c +++ b/driver_fw/src/main.c @@ -15,7 +15,7 @@ static void set_status_leds(uint32_t leds); static void dma_tx_constant(size_t table_size, uint16_t constant); static void dma_tx_waveform(size_t table_size, const uint16_t *table); -#define SYNC_INTERVAL 2 +#define SYNC_INTERVAL 13 static size_t time_to_sync = 0; static size_t tx_bitpos = 0; @@ -282,7 +282,7 @@ void DMA1_Channel1_IRQHandler() { } else { uint8_t b = tx_buf_read->bytes[tx_sympos]; packet_rng_state = xorshift32(packet_rng_state); - //b ^= packet_rng_state; FIXME DEBUG + b ^= packet_rng_state; current_symbol = xfr_8b10b_encode(&encoder_state_8b10b, b); sym_arr[sym_pos] = current_symbol; tx_sympos ++; |