OSD335x-SM UART3 connection to Atmeg2560

Forums Devices OSD335x-SM OSD335x-SM UART3 connection to Atmeg2560

Viewing 2 reply threads
  • Author
    Posts
    • #4995
      Gary Bronsongarybronson
      Participant

        In my PCBs i have a OSD335x-SM connection to Atmeg2560 via UART3. I have uploaded firmware to the Atmega using an ISP Programmer with no errors( i loaded firmata). I have loaded a new Beaglebone Black IoT image on the SD card and it is loading and booting fine. The board that has the OSD335x-SM is running and i can get an IP and connect to it with putty. I can also connect through the USB port i have on my board. All looks good with that. Now i am trying to verify the connection to the Atmeg2560 via UART3. the Beaglebone image has Node-Red installed so i used that to try to get access to the I/O provided by the Atmeg2560. Node-Red does detect 6 tty connections (/dev/ttyS0 – 5). I have tried all of these to gain access to the Atmega and none of them work. In node-red it just indicated no connection.
        I am wondering if there is some command i can run in putty to show me what is or is not enabled or connected. Is all of the UARTs enable by default or do i need to enable them manually. Is there a debug log or report that can show me that the Atmega is on the other end of UART3?

        I can connect a standard Arduino MEGA to the PCB usb port and Node-Red can see that one and i can get I/O from it as well. I just doesn’t see the one i have on board connected to UART3

        I’m posting here just in case its one of those stupid things i missed – like yes, you need to go in and enable it or something like that.

      • #5010
        Neeraj Dantu
        Moderator

          Hi Gary,

          From the schematics you provided us, the Atmega2560 looks like it is connected to pins (A13, B13) which are pins for UART2 and not UART3.

          The interface does need to be enabled in device tree. You can also specify a device tree overlay to instantiate the UART interface. For this, you will need to modify uEnv.txt located on /boot folder. You will need root privileges to modify this file. So, make sure you are root.

          I made 2 modifications to this file:

          1. uncommented uboot_overlay_addr0 and specified BB-UART2-00A0.dtbo as the device tree overlay(changes shown below)

          2. Commented the line to enable universal cape(shown below).

          Then I rebooted the board. I was able to see that UART2 was available as ttyO2:

          In order to test the interface, I used a UART to USB FTDI cable and connected it to my computer. I monitored the connection using Putty with baud rate 9600.

          On the board, I installed minicom which is a serial console program.

          I ran the following command to start a communication terminal on the board.

          I then input some characters and verified that they were showing up on my computer’s Putty terminal.

          Hope this helps,

          Please let us know if you have any more questions.

           

           

        • #5013
          Gary Bronsongarybronson
          Participant

            This was very helpful and i appreciate it very much. You are right, it is UART2. My schematic was incorrectly labeled as UART3. I can see the extra UART now. This did not solve my issue with the communication with the Atmega chip using Node-Red but at least I’m closer to the solution.

             

            Thank You

        Viewing 2 reply threads
        • You must be logged in to reply to this topic.