PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2480
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: How to use 2 SC16IS752,I USE I2C

Mon Mar 25, 2019 8:35 am

Install one of the debug versions of the modules (you have read this thread, haven't you?) and then report the error messages.

hnwangkg163
Posts: 19
Joined: Tue Sep 11, 2018 6:01 am

Re: How to use 2 SC16IS752,I USE I2C

Mon Mar 25, 2019 10:27 am

Should I also use the latest kernel for testing?
i think it is my kernel version problem

Code: Select all

[email protected]:/boot/overlays $ uname -r
4.14.50-v7+

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2480
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: How to use 2 SC16IS752,I USE I2C

Mon Mar 25, 2019 10:35 am

The updated overlay should work for all affected kernel versions. The debug module (which just adds some more error messages and doesn't fix anything) has to match the running kernel version.

sdmill
Posts: 5
Joined: Fri Nov 15, 2019 11:50 pm

Re: How to use 2 SC16IS752,I USE I2C

Sat Nov 16, 2019 12:27 am

Hello,

My apologies for restarting this conversation - but as others have posted before me, I'm trying to utilize multiple of these Waveshare SC16IS752 cards for a project and am having some issues.

What I have found so far, all done within this last week, is that if I start with updating Buster completely, I am able to use one of the cards successfully. i2cdetect -y 1 displays both cards, (soldered for 0x48 and 0x49) but only prints UU for 49. 49 transmits and receives successfully while doing a loopback test. ls /dev/ttySC* also only shows SC0 and SC1.

If I update the kernel via rpi-update, all of a sudden I receive the additional serial ports (SC2 and SC3) and I can transmit successfully, but I can not receive. I wracked my brain for a bit before discovering that the IRQ pin on the chip would drop low as soon as I opened a terminal for the serial connection (like puTTY or miniterm). Watching it with a meter I can see the IRQ fall when the terminal is opened, rendering the port only able to Tx and rise again with the terminal was closed. I also noticed that I could still get it to momentarily work by applying a load (in this case a Sunfounder2004LCD) to the 5V bus which would momentarily cause the IRQ to go high and serial messages would appear in miniterm/puTTY. After perhaps a second it falls low again.

Any help would be greatly appreciated!

sdmill
Posts: 5
Joined: Fri Nov 15, 2019 11:50 pm

Re: How to use 2 SC16IS752,I USE I2C

Sat Nov 16, 2019 3:48 am

To amend my previous post, I identified a mistake I made creating the overlay assignments in the /boot/config.txt. I forgot the '=' in int_pin=XX. I've also determined that the lower board, 0x48, functions perfectly upon initial boot. It happens to be the lower board and I only took meter readings on the top. I can tie ttySC0 and SC1 (provided by 0x48) together and tx/rx successfully via miniterm/puTTY. 0x49 can still only tx however when I test it by tying it to the AMA0 port (I've disabled the BT uart via overlay=pi3-disable-bt).

Additionally, if I test 0x49's ports by tying them to 48's, then 48's stops working all together as well and requires a reboot to restore functionality.

sdmill
Posts: 5
Joined: Fri Nov 15, 2019 11:50 pm

Re: How to use 2 SC16IS752,I USE I2C

Sat Nov 16, 2019 6:29 pm

Aaand one last discovery, full functionality seems to follow which ever board is assigned int_pin=24.

I have tried assigning the int pin based on above posts and have tried 18 with no success. I’ve done a gpio readall to see other default low pins and have tried several with no change.

Return to “Device Tree”