Bit-banged 8-port RS-232 communication library

Discussion and questions about programming with Ultibo.
ZeroHobby
Posts: 7
Joined: Fri Aug 09, 2019 2:11 pm

Re: Bit-banged 8-port RS-232 communication library

Postby ZeroHobby » Mon Aug 19, 2019 2:45 pm

stevenpostma wrote:Using DMA on an I/O port has the disadvantage that this claims all GPIO output pins for the serial ports
- even precious signals like SPI chip selects for things like LCD screens, ADCs and the like.
So this renders both SPI ports useless as far as I can see.


Not quite. The BCM2835 has a rather unique I/O layout (shared with the ESP32, so I guess it isn't that unique), where instead of a single GPIO output register, there are TWO GPIO output registers per port (BCM2835 ARM Peripherals, page 95). GPSETn and GPCLRn. To make a GPIO output HIGH, you set a bit in the corresponding GPSETn register. To make the same GPIO output LOW, you set a bit in the corresponding GPCLRn register. This would make DMA a bit more challenging (possibly requiring two DMA channels for output...?), but if the only bits in the DMA bitstream were for the desired GPIO pins, then all other GPIO pins won't be affected.

Sorry I still haven't gotten to the project...a different project that's a bit more pressing landed on my plate. I sure hope to get to this shortly, though. Should be a lot of fun.

Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest