Where is the schematic and pin specific functionalities for up 4000 board?

susWorld
susWorld New Member Posts: 14

Hi,
I am trying to write a driver for up4000 board and I need a datasheet that specifies how all pins are connected (schematic) and functionalities that each pin supports. I couldn't find all these detailed information in the "Datasheet" that is available on the up board website.
Can someone help me with this?

Answers

  • Wilbert
    Wilbert New Member Posts: 168 ✭✭✭

    Hi Sir,

    You can refer to our user menu, which has the corresponding Pin define.
    Schematic is a confidential document, and we do not disclose it.
    If necessary, please tell me what details you need, I may use a simple diagram to tell you.
    In principle, most of the HAT40 comes out of the CPU, and after a simple protection circuit, it is connected to the HAT40. We also have a demo code for your reference.

    https://downloads.up-community.org/download/up-4000-user-manual/

    Best Regards,
    Wilbert Lee

  • susWorld
    susWorld New Member Posts: 14

    Can you draw the schematic for how all the gpio pins are connected and to what line?

  • Wilbert
    Wilbert New Member Posts: 168 ✭✭✭

    Hi Sir,

    Due to pins too much and some of them are confidential documents, I can only provide some information.
    I wrote the PIN for connecting the CPU to the HAT40 in Excel, for reference only.
    We have some level shift design between CPU and HAT40, not a direct connection.

    Hope this information can help you, please ask if you have any other questions.

    Best Regards,
    Wilbert Lee

  • susWorld
    susWorld New Member Posts: 14

    So I've been trying to turn on and off an led light and found that three of the GPIO pins (405, 403 and 402, which are all in gpiochip1) are not functional. even with the direction set to input, the pins are not responding to high and low values, it stays constant. Do you happen to know why that is the case?
    The other pins that don't work are:
    326
    327
    328
    464
    465

  • susWorld
    susWorld New Member Posts: 14

    Does it have anything to do with Pull up resistor being disabled?

  • Wilbert
    Wilbert New Member Posts: 168 ✭✭✭
    edited April 2023

    Hi Sir,

    The LED you said cannot be controlled, are these three LEDs(Yellow/Green/Red)? (You can first control it through the BIOS and turn on the LED light to confirm)
    If yes, please refer to the following website, the bottom part about LED
    https://github.com/up-board/up-community/wiki/Pinout_UP4000

    Best Regards,
    Wilbert Lee

  • susWorld
    susWorld New Member Posts: 14
    edited April 2023

    I was simply testing the gpio functionality of the gpio pins on the board. So I export the pin and set direction to out and set value to 1 if it is low or set value to 0 if it's high to see if the gpio pins are doing the right thing. The board thinks its setting gpio pins to high or low, but I don't see the led turning on or off. I was able to blink the led with all the other gpio pins except the ones listed above. And I am specifically interested in 405, 403 and 402 pins since these pins are JUST gpio and nothing else.
    So my question is, why it is not possible to set the value of those gpio pins but it is possible to control other gpios?

  • susWorld
    susWorld New Member Posts: 14

    Turns out the pins in question can be controlled by BIOS but not by OS.

  • susWorld
    susWorld New Member Posts: 14

    Hey Wilbert,
    in the BIOS I can toggle the GPIO pins to "OUTPUT" and "HIGH" and can measure the voltage in the pin going to 3.3V. But when I switch back to sysfs, the state of the pin doesn't change and stays the same as it was configured in BIOS. Changing the state of the pins also doesn't report any error by the OS. Since the pins are configurable by the BIOS and not by the OS, there might be some issue with how it is integrated in the OS. I am on Ubuntu 20.04 and Kernel version 5.4.0.
    Any idea what is causing this?

  • Wilbert
    Wilbert New Member Posts: 168 ✭✭✭

    Hi Sir,

    Since the GPIO mapping may be changed after Ubuntu updates the Kernel.
    We recommend to install the PinCtrl provided by UP-Wiki, which will directly map the GPIO on the corresponding hardware, and will not change the GPIO due to the Kernel update, resulting in The user cannot find the corresponding GPIO.

    You can refer to the following URL to use Pinctrl.
    Usage : https://github.com/up-board/up-community/wiki/Pinout
    Installation : https://github.com/up-board/up-community/wiki/Pinout

    Best Regards,
    Wilbert Lee

  • susWorld
    susWorld New Member Posts: 14

    Hi can you please **send me an instruction **on how to install the PinCtrl. I couldn't find any link to install on the links you sent.
    Also, does having a PinCtrl puts all the pins into Rpi pin configuration? If so, we can't use it upboard doesn't support digital interrupt on raspberry pi pin mapping.
    Thanks for responding so fast. I appreciate it.

  • susWorld
    susWorld New Member Posts: 14

    I couldn't find any instructions on the forum about how to install it or how to use it. So can you please send me a Step by Step instruction.

  • Wilbert
    Wilbert New Member Posts: 168 ✭✭✭

    Hi Sir,

    Sorry, I pasted the above URL repeatedly, please use the URL that has been downloaded
    https://github.com/up-division/pinctrl-upboard/releases

    Best Regards,
    Wilbert Lee

  • susWorld
    susWorld New Member Posts: 14

    Hi Wilbert,
    So I installed the pinctrl driver, but now I can not export GPIO pins at all. when I try to export GPIO pins I get the error -bash: echo: write error: No such device
    And I can not export GPIO pin by the Rpi number or the Linux number. Any idea what I can do to gain access to the GPIO pins again?

  • susWorld
    susWorld New Member Posts: 14
    edited May 2023

    To add more to it, I was running as a root and still got the "No such device" error.

    I uninstalled the pinctrl driver and now can control the gpio pins again. If pinctrl driver is recommended, how should I install it. Can you please send a step by step instruction?
    Also can you please explain what the driver should be doing?

  • Wilbert
    Wilbert New Member Posts: 168 ✭✭✭

    Hi Sir,

    I quickly wrote the SOP for your reference. The tests on my side are normal and can be used.
    Perhaps, you did not restart after the installation, which caused some abnormalities in TOOL.
    Or if you have any detailed steps, you can tell me so that I can replicate your problem

    Best Regards,
    Wilbert Lee

  • susWorld
    susWorld New Member Posts: 14

    That document was really helpful. Thank you for that.
    I installed the driver according to the doc, gpiochip0 did not show up, instead I saw this "gpiochip779 gpiochip822 gpiochip869 gpiochip946 ". The base number for all gpiochip has changed. I tried exporting rpi gpio pins but it did not work. But when I tried to export gpio821, it worked. What's going on? What am I missing?

  • Wilbert
    Wilbert New Member Posts: 168 ✭✭✭

    Hi Sir,

    Please provide your Ubuntu version, BIOS version, and installation steps (what command to install or other methods).
    Since the internal test is all good, I can't reproduce the phenomenon that there is no gpiochip0 after the installation is complete, so I can't help you very well.
    If possible, please provide details so that I can reproduce your problem so that I can solve your problem.

    Best Regards,
    Wilbert Lee.

  • susWorld
    susWorld New Member Posts: 14
    edited May 2023

    Hi,
    I am running ubuntu 22.04 kernel 5.15.0-71-generic. (I also tried running this on ubuntu 20.04 with kernel 5.19 and 5.15)
    The good news is that I am able to see gpiochip0 and I tried exporting gpio27, and I can!!!.
    The bad new is that the gpio27 doesn't include digital interrupt. And the other gpiochips are listed as gpiochip0 gpiochip779 gpiochip822 gpiochip869 gpiochip946.
    The pinout in the wiki doesn't match the gpiochip base number.
    Was I supposed to see "edge" with gpio27 after installing the pinctrl?

  • susWorld
    susWorld New Member Posts: 14

    Which ubuntu and kernel version are you using? From what I understand kernel 5.15 may be the reason for the remapping of GPIO pins. Correct me if I'm wrong.

  • Wilbert
    Wilbert New Member Posts: 168 ✭✭✭

    Hi Sir,

    We are working hard to add IRQ function, but there are some technical problems, SW engineers are still working on it.
    So at present, it can only control IO simply, and there is no interrupt function.

    If you need IRQ, you will need the original GPIO to correspond to the Number, and it is possible to use the original one.

    Best Regards,
    Wilbert Lee

Privacy Policy