Search results

  1. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    Thanks again for sharing your knowledge and providing guiding questions. I'm not sure how much current the 12V supply can provide but it is protected by a 3AMP fuse on the main board. The 4-wires run to each of a maximum of 8 thermostats are no more than 50-75 feet long in any normal home. This...
  2. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    Thanks for confirming the AC grounding difference as a potential issue. I will investigate that again. This was years ago and I've learned a bit more about hardware since then so I might have been wrong in some details. I am questioning all of the assumptions I realize that I'm making. (Problem...
  3. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    Rcarr, Thanks for mentioning the ground loop issue. I did not mention this because I thought more complexity would confuse rather than clarify. However, I do believe that I have an AC ground loop in this house and I wondered if that could affect this rs485 design when it's connected to the PC...
  4. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    I found that and believed it might work -- but I noticed in my current design pin 19 and 18 are being used for SCL0 and SDA0 respectively (temp/humidity sensor). So now I get to find out how to assign the other pins you allow for I2C (17 and 16 for SDA and SCL respectively)! Cool. Learning more...
  5. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    You make the same point I made to myself. But here's my thinking. With this circuit it's been able to receive reliably and transmit reliably but not switch back and forth. So I conjectured that maybe there's something inside the MCU FIFO logic / state machine related to half-duplex control and...
  6. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    I was wondering about this the whole time -- even before I posted the first note. Is the RTS pin for UART0 available in Teensy 3.2. I might try hardware transceiver control using the modem register like the NXP training slide suggested if I can use the RTS pin.
  7. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    I've added the 3 resistors and unfortunately it did not fix the problem but showed a new one and led to an interesting discovery. Short story is that the Rx pullup changed nothing on the scope or in the output of the sketch. Adding the Failsafe pull-down caused transmits to fail completely...
  8. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    I will make these changes and re-test. I'll also read the reference you provided. Thank you very much for spending your limited time to look at this and give me such specific guidance. I hope I will be able to return the favor with dividends.
  9. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    Ok, now I see we have identical results. That's good.
  10. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    Interesting that you don't get the spurious nul bytes after the 2nd transmit. Due to some difference between the 483 and 487 perhaps?
  11. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    Thanks for that clarification. I would prefer to use a design with Teensy that you advocate rather than changing to the one some unnamed NXP presenter put into a training slide! So I will stick with transmitenable() and just work to fix the circuit I'm using. I have not read your responses...
  12. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    I'm going to try to do the scope tests as you suggest and will share them. Here is the circuit of the existing thermostat whose UI (16x2 char + 3 button) hardware I'm trying to replace with a TFT Touchscreen from Adafruit. Since I am not an EE or electrical technician, and need backwards...
  13. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    Thanks so much for the additional details, you're very generous with sharing your knowledge here -- As I wrote, I'm not an EE and the circuit I used is cloned (save for the MCU) from the existing thermostat design. All it uses is a termination resistor at each thermostat. I've read the app...
  14. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    Do you think I have created the wrong circuit? With the post from Len fresh in my mind, I started a web search for "+Kinetis +K20 +USART +RS485 +Errata" hoping to find something useful. I found this: https://www.nxp.com/docs/en/supporting-information/UART-Training.pdf. On slide 12 is a...
  15. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    Thank you so much for these details. It helps me focus my attention in the right place in the haystack (manual). I looked for FE and other errors in the registers following the failure and did not notice them but I'll look again more carefully.
  16. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    This is the first time I've worked with RS485 and half duplex on UARTS so I've been learning and obviously have more to learn. I also have a lot more to learn about using the scope properly so i'll try to do what you suggest. This old (20+ years) hand-me-down scope is really nice (4 channels...
  17. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    Sketch modified to capture Pin 9 trace Paul, This is a follow-up to my response about pin 9. Below is a modified sketch that receives and prints frames as before but also sends the reset frame periodically without regard for bus activity (will cause collisions). I ran this connected to the...
  18. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    Hi Paul, This is one of the first tests I did. In that test, PIN 9 returned low after the last call to Serial1.write(). It was done with my real application, not this stripped down one. However, I can and willbuild a slightly different sketch today that continually sends frames. (Unfortunately...
  19. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    The reason reception is disabled during transmission is because this is a half-duplex system. This circuitry (connecting pins 2 and 3 to the digital direction signal) is, I believe, the standard way to use the transceiver in a half-duplex application. If successful, this design is going into an...
  20. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    Thanks for the ideas. I had not considered eliminating the rs485 because that's a core requirement of the sketch/module. Half duplex is what the existing system uses and I'm building a thermostat to plug in place of the existing design. (I can't change the main AC controller at this time.) I...
  21. BradleyC

    Teensy 3.2 UART0 Receive Lockup after first Write in RS485 circuit

    This is an RS485 half-duplex application where I am trying to reverse engineer existing behavior in a multi-zone home AC system. The Teensy is connected to a working home AC system and is able to correctly receive and to transmit functioning command and response frames. However, it cannot...
  22. BradleyC

    How do I write sketch code to display UART Register contents on the debug console?

    Oops. The pre-edited post named my device: Teensy 3.2. I'm using Serial1 for RS-485 communication. I was unaware of the mapping of Arduino Serial1 to the MCU's UART0. That explains the likely machine check! THANK YOU! First time I used a Cortex M4 device I discovered this 'separate clock...
  23. BradleyC

    How do I write sketch code to display UART Register contents on the debug console?

    I confess to being a noob with Arduino/Teensyduino - not a noob to embedded development or Cortex M, however. Should it be possible to read any UART1 register and display it with code similar to that shown below that attempts to read the UART_BDH register? On the register access, the sketch...
  24. BradleyC

    How to diagnose input hang on Serial1 of Teensy 3.2

    Background My questions involve using Serial1 of Teensy 3.2 for asynchronous, half-duplex RS485 communication in a network with a maximum of 9 devices, all of which may communicate with any one of the other nodes in a command or response dialog. I have been reverse-engineering the protocol by...
  25. BradleyC

    Serial and RS485 questions

    I found my own answer to the QUESTION: It's here: https://www.pjrc.com/teensy/td_uart.html - and the way it is documented, ANY digital pin can be used by this function. If not any pin, then please let me know. I'm still curious about the use of MAX483.
  26. BradleyC

    Serial and RS485 questions

    I will soon be posting a support question with code and data regarding my application of teensy 3.2 in a 9-node RS485 half-duplex application. But I have been reading all of the forum postings returned from a search of "Serial1 RS485" and ran across this mention of the transmitterEnable()...
  27. BradleyC

    Why does COM Port change with different Teensy?

    I'm using Windows 7-64. I have 2 Teensy 3.2 systems. When I plug in the first one, I get COM 4 for the Monitor. When I plug in the second one I get COM 6. The actual USB port in the Notebook never changes. Just the target. The port number is 'sticky' across restarts of Arduino. Therefore, I'm...
Back
Top