Skip to content

Commit

Permalink
[sw/device] Update CALCULATE_UART_TX_FIFO_CPU_CYCLES for cw310
Browse files Browse the repository at this point in the history
PR lowRISC#17829 updated the FIFO size, but the constant in this macro was
still stale.

Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
  • Loading branch information
dmcardle committed Apr 25, 2023
1 parent a1d2362 commit 880e7e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sw/device/lib/arch/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ extern const uint32_t kUartNCOValue;
* Helper macro to calculate the time it takes to transmit the entire UART TX
* FIFO in CPU cycles.
*
* This macro assumes 10 bits per byte (no parity bits) and a 32 byte deep TX
* This macro assumes 10 bits per byte (no parity bits) and a 128 byte deep TX
* FIFO.
*/
#define CALCULATE_UART_TX_FIFO_CPU_CYCLES(baud_rate_, cpu_freq_) \
((cpu_freq_)*10 * 32 / (baud_rate_))
((cpu_freq_)*10 * 128 / (baud_rate_))

/**
* The time it takes to transmit the entire UART TX fifo in CPU cycles.
Expand Down

0 comments on commit 880e7e7

Please sign in to comment.