WIP tool78 stuff

This commit is contained in:
Triss 2022-07-02 01:13:44 +02:00
parent 09f91e51cb
commit 760ce1b2cc
2 changed files with 9 additions and 10 deletions

View File

@ -111,8 +111,7 @@ fsw: block=0000..003f, rw=y invert=y
uint8_t* datatoflash = false ? DATA_main_nodbg : DATA_main_dbgpad;
// NOTE: RL78 ONLY
if (sig.rl78.dev[0] == 'R' && sig.rl78.dev[2] == 'F') {
if (sig.rl78.dev[0] == 'R' && sig.rl78.dev[2] == 'F') { // RL78 ONLY
struct tool78_security sec;
memset(&sec, 0, sizeof sec);
st = tool78_do_security_get(hw, &sec);

View File

@ -212,14 +212,14 @@ end:
}*/
// FIXME: remove the dependency on tool78_hw_rl78_uart1!
if ((tool78_hw_rl78_uart1.flags & tool78_hw_flag_done_reset)
/*&& !(tool78_hw_rl78_uart1.flags & tool78_hw_flag_do_ocd)*/) {
// wait until everything is sent before reenabling the RX SM again
while (!pio_sm_is_tx_fifo_empty(PINOUT_TOOL78_PIO, vars->smtx))
; // wait until FIFO is clear
while (!(PINOUT_TOOL78_PIO->fdebug & ((1u << vars->smtx) << PIO_FDEBUG_TXSTALL_LSB)))
; // now wait for the SM to hang on the next 'pull'
}
//if ((tool78_hw_rl78_uart1.flags & tool78_hw_flag_done_reset)
// /*&& !(tool78_hw_rl78_uart1.flags & tool78_hw_flag_do_ocd)*/) {
// // wait until everything is sent before reenabling the RX SM again
// while (!pio_sm_is_tx_fifo_empty(PINOUT_TOOL78_PIO, vars->smtx))
// ; // wait until FIFO is clear
// while (!(PINOUT_TOOL78_PIO->fdebug & ((1u << vars->smtx) << PIO_FDEBUG_TXSTALL_LSB)))
// ; // now wait for the SM to hang on the next 'pull'
//}
//gpio_put(3, true);
//pio_sm_set_enabled(PINOUT_TOOL78_PIO, vars->smrx, true);