File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,8 @@ A secondary task of the PIO "tx" state machine is to inject an ack bit
9090to acknowledge messages received from other CAN bus nodes. To perform
9191this task, the ARM core fills the tx fifo with a single dominant bit
9292and arranges for the "tx" state machine to start after a "matched"
93- irq.
93+ irq. After the ack bit is transmitted the PIO "tx" state machine will
94+ raise an "ackdone" signal (PIO irq 3).
9495
9596# ARM core state tracking
9697
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ tx_align:
126126.program sm_tx_ack
127127 // CPU first disables state machine execution
128128 // CPU clears irq 2 and irq 3
129- // CPU changes instruction at tx_loop from "out x, 1" to:
129+ // CPU changes instruction at tx_got_recessive from "out x, 1" to:
130130 irq wait 3
131131 // CPU then loads tx fifo with ack (single off bit)
132132 set pins, 1
Original file line number Diff line number Diff line change @@ -942,19 +942,19 @@ report_note_discarding(struct can2040 *cd)
942942 pio_irq_set (cd , SI_MAYTX | SI_TXPENDING );
943943}
944944
945- // Received PIO rx "ackdone" irq
945+ // Received PIO "ackdone" irq ("tx" state machine completed ack bit transmit)
946946static void
947947report_line_ackdone (struct can2040 * cd )
948948{
949- // Setup "matched" irq for fast rx callbacks
949+ // Setup rx eof "matched" signal for fast rx callbacks
950950 uint32_t bits = (cd -> parse_crc_bits << 8 ) | 0x7f ;
951951 pio_match_check (cd , pio_match_calc_key (bits , cd -> parse_crc_pos + 8 ));
952952 // Schedule next transmit (so it is ready for next frame line arbitration)
953953 uint32_t check_txpending = tx_schedule_transmit (cd );
954954 pio_irq_set (cd , SI_MAYTX | SI_MATCHED | check_txpending );
955955}
956956
957- // Received PIO "matched" irq
957+ // Received PIO "matched" irq ("match" state machine detected eof match_key)
958958static void
959959report_line_matched (struct can2040 * cd )
960960{
You can’t perform that action at this time.
0 commit comments