Search found 27 matches

by humptydumpty
Tue May 22, 2018 3:52 pm
Forum: ESP-IDF
Topic: UART DMA code doesn't work
Replies: 17
Views: 20189

Re: UART DMA code doesn't work

Problem solved. You have to initialize some bits to zero in UHCI_CONF1_REG as well. Note that setting the whole register to 0 causes a DMA Descriptor error. You have to set the bits individually. The code below works for me: lldesc_t widget_usb_Msg; uint8_t dma_test_msg[8] __attribute__((aligned(32)...
by humptydumpty
Tue May 22, 2018 2:11 pm
Forum: ESP-IDF
Topic: UART DMA code doesn't work
Replies: 17
Views: 20189

Re: UART DMA code doesn't work

Let me qualify that. The DMA transfers data. But the 1st byte is not sent. And the 4th byte is not sent correctly. Here is my code: lldesc_t widget_usb_Msg; uint8_t dma_test_msg[8] __attribute__((aligned(32))) = { 49,50,51,52,53,54,55,56 }; void init_dmaDesc() { periph_module_enable(PERIPH_UHCI0_MOD...
by humptydumpty
Tue May 22, 2018 12:25 pm
Forum: ESP-IDF
Topic: UART DMA code doesn't work
Replies: 17
Views: 20189

Re: UART DMA code doesn't work

I got it to work.

There was a problem with the DMA descriptor. Checking the raw interrupt register was helpful. Also it turns out that resetting the fifo was not helpful.
by humptydumpty
Mon Jan 08, 2018 1:46 am
Forum: ESP-IDF
Topic: UART DMA code doesn't work
Replies: 17
Views: 20189

Re: UART DMA code doesn't work

bump. still need to use dma with uart.
by humptydumpty
Wed Nov 01, 2017 12:25 am
Forum: ESP-IDF
Topic: UART DMA code doesn't work
Replies: 17
Views: 20189

Re: UART DMA code doesn't work

3 weeks later....

Did anyone look at this code?
by humptydumpty
Wed Nov 01, 2017 12:20 am
Forum: Report Bugs
Topic: UART_TX_DONE_INT Issue
Replies: 1
Views: 3957

Re: UART_TX_DONE_INT Issue

I use the UART_TX_DONE_INT successfully in my application with no issues such as you describe.

I only enable the interrupt after filling the UART buffer, i.e. after transmission is already started.
by humptydumpty
Tue Oct 10, 2017 12:32 pm
Forum: ESP-IDF
Topic: UART DMA code doesn't work
Replies: 17
Views: 20189

Re: UART DMA code doesn't work

OK here is relevant code. Note that the UART functions correctly if I don't define USE_DMA: void uart_intr_setup(void){ state = STARTUP; reset_mem(); config(); periph_module_enable(PERIPH_UHCI0_MODULE); init_dmaDesc(); esp_err_t ret; uart_param_config(uart_num, &uart_config); ret = uart_set_pin(uart...
by humptydumpty
Mon Oct 09, 2017 7:36 pm
Forum: ESP-IDF
Topic: UART DMA code doesn't work
Replies: 17
Views: 20189

Re: UART DMA code doesn't work

Thanks for helping. Actually it is part of a much larger project which I would not, for reasons of confidentiality, want to post. We are talking about thousands of lines of code.

I will try to take the relevant parts and make an independent project out of it for test purposes.
by humptydumpty
Mon Oct 09, 2017 1:16 pm
Forum: ESP-IDF
Topic: UART DMA code doesn't work
Replies: 17
Views: 20189

Re: UART DMA code doesn't work

Still no dice. I notice that DMA routines for I2S and SPI reset the bus before start. Not sure why the reset bits in the UHCI configuration register are marked reserved in the TRM, but enumerated in the esp-idf include files. Anyway I tried it both ways. No signal. You wrote somewhere else that you ...
by humptydumpty
Sat Oct 07, 2017 9:30 pm
Forum: ESP-IDF
Topic: UART DMA code doesn't work
Replies: 17
Views: 20189

Re: UART DMA code doesn't work

Sorry I didn't see your comment about the bitfields that should be zero until just now. It appears that there might be an error in uhci_struct.h . There are a number of bitfields in the struct that are not in the TRM. For example UHCI_OUT_DATA_BURST_EN, UHCI_OUTDSCR_BURST_EN and UHCI_INDSCR_BURST_EN...