Author Topic: UART Hardware fifo  (Read 6543 times)

0 Members and 1 Guest are viewing this topic.

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4085
  • Country: gb
Re: UART Hardware fifo
« Reply #50 on: October 10, 2022, 02:19:04 pm »
Well, I got the first end-to-end data displayed on the TFT!

2 render cells.  The background and a temperature.

The thing is, I had a bug where it was rendering the cell every loop as I was accidentally local copying the struct and setting it to "CLEAN".

I had lots of UART errors on the messaging channel.

The idea is, it will only render one dirty cell at a time.  It only has to skip iterations when it's previous DMA transfer was not complete.  I might need to adjust it's timing such that it skips iterations more readily or even only fires on a timer iterrupt once in a while.

I also need to add debug for the buffers.  Something that doesn't require synchronisation like pinging a GPIO on if/when the UART reader gets handed a NULL buffer (queue full).

I am still hammering it.  The MQTT topic I subscribed to produces messages for all sensors, about 30 of them.  I'm only displaying 2, but keeping the test rig running with the worst case should stop me hiding load related issues.
« Last Edit: October 10, 2022, 02:21:15 pm by paulca »
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4085
  • Country: gb
Re: UART Hardware fifo
« Reply #51 on: October 10, 2022, 04:13:02 pm »
I scoped it, toggling a GPIO pin before and after intense sections.

Message processing to lookup the render_cell (if one), including the strcmp and update the values, including the memset/memcpy to get it out of the IO Buffer!  120us.

Rendering that single string with a label to the screen, 3.5ms.

Not unexpected.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf