Linux USB ports

I have a nrf9160dk that drives a screen via SPI, using an IT8951 controller. The firmware driving the screen works fine if I plug the USB cable on a power bank or using MS Windows, but the screen updates are not performed when using Linux as host machine, all debug messages are printed correctly via minicom but the screen is doing nothing. Even with a very old Windows version (XP) it works fine but never under Linux. I tried on different computers and different kind of USB ports , v.2 and v.3. I used also the suggested blacklist of udev, to avoid any interference with ModemManager but no success. I was thinking the problem was a lack of power on USB ports so I purchased an external USB hub powered by a separate power supply, but even this solution didn't work. Is there any special configuration on USB that I have to perform under Linux ? Or do you have any indication on how to solve the issue ?

Thanks.

Best Regards

Parents
  • Hi Amelio,

    Can you share a bit more information about the current hardware setup ?

    How do you provide power to the screen ? If you power it through the DK, which pin are you using ?

    Are you able to measure the current (using a PPK2 or an oscilloscope) ? How much current is drawn ?

    I have a nrf9160dk that drives a screen via SPI, using an IT8951 controller.

    Are you sure the problem is on the nrf9160 side and not on the IT8951 controller? To check it, you can try to measure the SPI signals to see if there is some communication happening.

    The firmware driving the screen works fine if I plug the USB cable on a power bank or using MS Windows

    Do you have a serial terminal open on Windows when it works fine ? And on Linux, does it work when no serial terminal is connected ? It might be that for some reason, your serial communication is interfering with the SPI of the screen.

    I was thinking the problem was a lack of power on USB ports

    You can try to run the command "lsusb -d 1366:1055 -v | grep MaxPower" in a Linux terminal with the device connected. It should show you the Maximum Power requested by the SEGGER J-Link. 

    In my case, it shows :

    $ lsusb -d 1366:1055 -v | grep MaxPower 
        MaxPower              100mA

    Maybe Windows and the power bank don't care about this value and output as much current as the device wants... If this is the issue, it might be possible to make the device request more power, but I'll have to look in more detail to do so.

    Tell me if any of this helped.

    Best regards,

    Simon D-M

  • Sorry for late reply but I was abroad some days.

    The screen is connected via a ribbon cable to IT8951, and the IT8951 is connected to nrf9160DK using the pins P0.31,  P0.30, P0.20, GND, P0.14, P0.15, P0.16, 5 V

    At the moment I cannot measure the current (if really important I will try to get a PPK2)

    Under MS Windows I have a serial terminal opened when it works fine. Under Linux it do not work with or without the serial terminal opened.

    The Maximum power command gives (BTW the ID is 1064 and not 1055):

    $ lsusb -d 1366:1064 -v | grep MaxPower


    MaxPower 500mA

    Let me know if this info is enough for your needs.

    Thanks

    Best Regards

    Amelio

  • Hi,

    amelio said:
    The Maximum power command gives (BTW the ID is 1064 and not 1055):

    My bad, apparently the product ID is not always the same everywhere. On my device, it was 1055.

    amelio said:
    Under MS Windows I have a serial terminal opened when it works fine. Under Linux it do not work with or without the serial terminal opened.

    When you tried on Linux and Windows did you use different computer or is it always the same one ? It may be caused by a difference between computer and not OS. 

    amelio said:
    MaxPower 500mA

    Do you know what is the theoretical maximum value that the screen + driver should be drawing ?

    It might be useful to monitor the current (and maybe even the voltage) to be sure that the problem is about the power and not something else.

    Some other possibilities can be that there is a grounding issue between the screen/IT8951 and the board. Or Maybe you need a bigger capacitor for the IT8951 or the screen. There are too many possibilities to have a definitive answer there.

    amelio said:
    Let me know if this info is enough for your needs.

    Would it be possible to have some schematics / photos. And Maybe even a bit of code ? I can convert this ticket to private if you don't want to share them publicly (ask me first, and send the files only when the ticket is private), however if you don't mind, I would rather have the ticket public so that if someone has the same problem, the ticket can be found. 

    Best regards,

    Simon D-M

  • Hi Simon,

    1) The computer is the same (a desktop machine). Windows is version 11, Linux is Ubuntu 24

    2) my colleague told me the current can be up 500 mA so we are very close to Linux limit

    3) below a picture of system. I don't have the code right now as it is under development by a colleague. I can ask him if you consider it very important.

  • Hi,

    amelio said:
    below a picture of system.

    I think you didn't send the picture. Can you please resend it ?

    amelio said:
    my colleague told me the current can be up 500 mA so we are very close to Linux limit

    I think it would then be a good idea to measure the power usage to see it there are some amperage issue or some voltage drop. Maybe a capacitor close to the screen / driver can do the trick.

    Best regards,

    Simon D-M

  •  Hi Simon, I tried to resend the pic (using the INSERT label) but maybe I cannot follow the right way, could you please help me ?

Reply Children
No Data
Related