Hardware flow control CTS/DSR

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm trying to implement a way for my device to "self program" in the field. I want to download the new binary image onto the SD card, increment the version in EEPROM and issue a reset command. The boot loader will see the new version, and program the flash. It's close to working (if I put the image on the sd card manually)- but my download is having some issues.

Has anyone been able to implement hardware flow control for the uarts. I'm receiving large amounts of data and need some way to tell the sender (rn-171) to hold on a bit while I write the data to the sd drive.

option 2 - can writing with spi be done in DMA? I get the buffer overflows while I'm writing to an SD card. it is possible to offload this activity onto either the event system or dma?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For CTS/RTS (not DSR as that only tells the sender that power is on) handshaking you will need to monitor the "water mark" on the input buffer, when it's, say, 80% full you de assert CTS to tell the sender to stop sending until you have enough space in the buffer (20% full??).

The gap is necessary as Window may NOT stop until it's buffer is empty so you are likely to end up with several data bytes coming in even though you have signaled to stop sending data.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Implement a packet protocol with software handshake. Xmodem is one suggestion