adriendesp commented on code in PR #16923: URL: https://github.com/apache/nuttx/pull/16923#discussion_r2306751571
########## arch/arm/src/xmc4/Kconfig: ########## @@ -326,6 +326,24 @@ config XMC4_USIC0_CHAN1_ISI2S endchoice # USIC0 Channel 1 Protocol +config XMC4_USIC0_CHAN0_TX_BUFFER_SIZE + int "Unused channel 0 Tx Fifo Buffer Size" + depends on !XMC4_USIC0_CHAN0_ISUART + default 16 + ---help--- + Should be a power of 2 between 2 and 64 + The sum of Rx and Tx buffers sizes of both + channels should be inferior to 64 Review Comment: Hey, sure, here is a little context : XMC4 has 3 USIC peripherals that handle all the supported communication protocols. Each USIC has 2 channels that can be used a 2 different protocol (ex: USIC0_CHAN0 is SPI, USIC0_CHAN1 is UART). Each USIC has a 64bytes buffer shared for RX and TX data of both channels. It can be freely allocated. In NuttX, the only driver that takes advantage of this buffer is the serial. Both SPI and I2C use single RX/TX registers with interrupts. That's why it's only with UART. Today, when you use only the CHAN1 and not the CHAN0, the way the buffer is handled, it won't even compile. I want to give the user the full control over the buffer even if channel 0 is disabled. So when channel 0 is disabled, in the channel 1 config, the user can still set the allocated buffer sizes for all channels. I will add some explanation in the menuconfig and add a commit message. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org