skrishnamoorthy
Posts: 4
Joined: Thu Jun 17, 2021 5:24 pm

[SOLVED] SC16IS752 attachment as serial

Thu Jun 17, 2021 5:32 pm

Hello,

I have a custom board attached to a Raspberry Pi 3B+ on which I have a SC16IS752 chip for I2c to UART conversion :https://www.nxp.com/docs/en/data-sheet/ ... 6IS762.pdf

I have all the libraries installed - BCM2835 (v1.68), WiringPi, SMBus, RP-GPIO. I added the overlay and enabled i2c :

dtoverlay=sc16is752-i2c,int_pin=24,addr=0x48

Running i2cdetect on i2c bus 1, I see a device at 0x48. I don't have any devices connected yet to the UART end, but I don't see any ttySC0 or ttySC1 in /dev...It also seems to me by looking online that the device should show up as UU and not 48 in the i2cdetect matrix.

Any thoughts on what might be wrong here?

Thanks for your help!

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

Re: SC16IS752 attachment as serial

Thu Jun 17, 2021 8:36 pm

Post the output of "sudo vcdbg log msg", "dmesg" and "lsmod".

skrishnamoorthy
Posts: 4
Joined: Thu Jun 17, 2021 5:24 pm

Re: SC16IS752 attachment as serial

Thu Jun 17, 2021 8:42 pm

Hello,

Thanks for responding!I've spent the last few hours reading up on the problem, and one of the solutions I found was to upgrade the OS - it seems like it was caused by a version of Stretch that was older than August 2020. I did a lengthy upgrade of the OS and it seems to be resolved now.

Thanks again!

Here are the outputs with the upgraded OS, for posterity:

Code: Select all

sudo vcdbg log msg
001035.545: brfs: File read: /mfs/sd/config.txt
001036.611: brfs: File read: 1797 bytes
001047.153: HDMI:EDID error reading EDID block 0 attempt 0
001048.455: HDMI:EDID error reading EDID block 0 attempt 1
001049.748: HDMI:EDID error reading EDID block 0 attempt 2
001051.043: HDMI:EDID error reading EDID block 0 attempt 3
001052.336: HDMI:EDID error reading EDID block 0 attempt 4
001053.631: HDMI:EDID error reading EDID block 0 attempt 5
001054.924: HDMI:EDID error reading EDID block 0 attempt 6
001056.219: HDMI:EDID error reading EDID block 0 attempt 7
001057.512: HDMI:EDID error reading EDID block 0 attempt 8
001058.807: HDMI:EDID error reading EDID block 0 attempt 9
001059.863: HDMI:EDID giving up on reading EDID block 0
001060.222: HDMI:EDID error reading EDID block 0 attempt 0
001061.521: HDMI:EDID error reading EDID block 0 attempt 1
001062.819: HDMI:EDID error reading EDID block 0 attempt 2
001064.117: HDMI:EDID error reading EDID block 0 attempt 3
001065.415: HDMI:EDID error reading EDID block 0 attempt 4
001066.713: HDMI:EDID error reading EDID block 0 attempt 5
001068.011: HDMI:EDID error reading EDID block 0 attempt 6
001069.309: HDMI:EDID error reading EDID block 0 attempt 7
001070.607: HDMI:EDID error reading EDID block 0 attempt 8
001071.905: HDMI:EDID error reading EDID block 0 attempt 9
001072.966: HDMI:EDID giving up on reading EDID block 0
001088.382: brfs: File read: /mfs/sd/config.txt
001089.452: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
001287.316: gpioman: gpioman_get_pin_num: pin DISPLAY_DSI_PORT not defined
001288.585: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
001288.670: *** Restart logging
001288.736: brfs: File read: 1797 bytes
001289.762: hdmi: HDMI:EDID error reading EDID block 0 attempt 0
001291.071: hdmi: HDMI:EDID error reading EDID block 0 attempt 1
001292.374: hdmi: HDMI:EDID error reading EDID block 0 attempt 2
001293.677: hdmi: HDMI:EDID error reading EDID block 0 attempt 3
001294.980: hdmi: HDMI:EDID error reading EDID block 0 attempt 4
001296.283: hdmi: HDMI:EDID error reading EDID block 0 attempt 5
001297.586: hdmi: HDMI:EDID error reading EDID block 0 attempt 6
001298.889: hdmi: HDMI:EDID error reading EDID block 0 attempt 7
001300.192: hdmi: HDMI:EDID error reading EDID block 0 attempt 8
001301.495: hdmi: HDMI:EDID error reading EDID block 0 attempt 9
001302.561: hdmi: HDMI:EDID giving up on reading EDID block 0
001302.925: hdmi: HDMI:EDID error reading EDID block 0 attempt 0
001304.225: hdmi: HDMI:EDID error reading EDID block 0 attempt 1
001305.524: hdmi: HDMI:EDID error reading EDID block 0 attempt 2
001306.823: hdmi: HDMI:EDID error reading EDID block 0 attempt 3
001308.122: hdmi: HDMI:EDID error reading EDID block 0 attempt 4
001309.421: hdmi: HDMI:EDID error reading EDID block 0 attempt 5
001310.720: hdmi: HDMI:EDID error reading EDID block 0 attempt 6
001312.019: hdmi: HDMI:EDID error reading EDID block 0 attempt 7
001313.318: hdmi: HDMI:EDID error reading EDID block 0 attempt 8
001314.617: hdmi: HDMI:EDID error reading EDID block 0 attempt 9
001315.679: hdmi: HDMI:EDID giving up on reading EDID block 0
001316.012: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
001316.084: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
001317.958: brfs: File read: /mfs/sd/cmdline.txt
001318.055: Read command line from file 'cmdline.txt':
001318.119: 'dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=b21c111b-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait'
001318.434: brfs: File read: 142 bytes
001721.627: brfs: File read: /mfs/sd/kernel7.img
001721.688: Loading 'kernel7.img' to 0x8000 size 0x510950
001726.083: No kernel trailer - assuming DT-capable
001726.171: brfs: File read: 5310800 bytes
001732.407: brfs: File read: /mfs/sd/bcm2710-rpi-3-b.dtb
001732.471: Loading 'bcm2710-rpi-3-b.dtb' to 0x518950 size 0x675f
001875.997: brfs: File read: 26463 bytes
001878.993: brfs: File read: /mfs/sd/config.txt
001879.534: dtparam: i2c_arm=on
001896.501: dtparam: audio=off
001916.321: brfs: File read: 1797 bytes
001938.397: brfs: File read: /mfs/sd/overlays/pi3-disable-bt.dtbo
001960.197: Loaded overlay 'pi3-disable-bt'
001960.280: dtparam: act_led_trigger=none
002040.242: brfs: File read: 954 bytes
002061.994: brfs: File read: /mfs/sd/overlays/sc16is752-i2c.dtbo
002075.689: Loaded overlay 'sc16is752-i2c'
002075.748: dtparam: i2c_gpio_sda=2
002081.444: Unknown dtparam 'i2c_gpio_sda' - ignored
002081.499: dtparam: i2c_gpio_scl=3
002087.206: Unknown dtparam 'i2c_gpio_scl' - ignored
002087.264: dtparam: int_pin=24
002087.703: dtparam: addr=0x48
002088.553: dtparam: act_led_activelow=on
003996.668: gpioman: gpioman_get_pin_num: pin EMMC_ENABLE not defined
004099.082: Device tree loaded to 0x2eff9300 (size 0x6c88)
004101.150: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
005496.011: vchiq_core: vchiq_init_state: slot_zero = 0xfad80000, is_master = 1
009741.226: brfs: File read: 1356 bytes

Code: Select all

dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.66-v7+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1253 SMP Thu Aug 15 11:49:46 BST 2019
[    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Rev 1.2
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 8 MiB at 0x3ac00000
[    0.000000] On node 0 totalpages: 242688
[    0.000000]   Normal zone: 2133 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 242688 pages, LIFO batch:63
[    0.000000] random: get_random_bytes called from start_kernel+0xac/0x4b4 with crng_init=0
[    0.000000] percpu: Embedded 17 pages/cpu s39488 r8192 d21952 u69632
[    0.000000] pcpu-alloc: s39488 r8192 d21952 u69632 alloc=17*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 240555
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=PARTUUID=b21c111b-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 939088K/970752K available (8192K kernel code, 629K rwdata, 2176K rodata, 1024K init, 821K bss, 23472K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xbb800000 - 0xff800000   (1088 MB)
                   lowmem  : 0x80000000 - 0xbb400000   ( 948 MB)
                   modules : 0x7f000000 - 0x80000000   (  16 MB)
                     .text : 0x(ptrval) - 0x(ptrval)   (9184 kB)
                     .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
                     .data : 0x(ptrval) - 0x(ptrval)   ( 630 kB)
                      .bss : 0x(ptrval) - 0x(ptrval)   ( 822 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 26394 entries in 78 pages
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000007] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000023] Switching to timer-based delay loop, resolution 52ns
[    0.000289] Console: colour dummy device 80x30
[    0.000911] console [tty1] enabled
[    0.000973] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.001018] pid_max: default: 32768 minimum: 301
[    0.001377] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001414] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.002349] CPU: Testing write buffer coherency: ok
[    0.002835] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.003505] Setting up static identity map for 0x100000 - 0x10003c
[    0.003672] rcu: Hierarchical SRCU implementation.
[    0.004482] smp: Bringing up secondary CPUs ...
[    0.005348] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.006284] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.007137] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.007258] smp: Brought up 1 node, 4 CPUs
[    0.007339] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.007364] CPU: All CPU(s) started in HYP mode.
[    0.007384] CPU: Virtualization extensions available.
[    0.008374] devtmpfs: initialized
[    0.021392] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[    0.021667] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.021715] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.022320] pinctrl core: initialized pinctrl subsystem
[    0.023193] NET: Registered protocol family 16
[    0.026174] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.031882] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.031919] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.032148] Serial: AMBA PL011 UART driver
[    0.034465] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.069659] bcm2835-dma 3f007000.dma: DMA legacy API manager at (ptrval), dmachans=0x1
[    0.071389] SCSI subsystem initialized
[    0.071632] usbcore: registered new interface driver usbfs
[    0.071707] usbcore: registered new interface driver hub
[    0.071824] usbcore: registered new device driver usb
[    0.090115] raspberrypi-firmware soc:firmware: Attached to firmware from 2019-08-15 12:06, variant start
[    0.100397] raspberrypi-firmware soc:firmware: Firmware hash is 0e6daa5106dd4164474616408e0dc24f997ffcf3
[    0.111697] clocksource: Switched to clocksource arch_sys_counter
[    0.200802] VFS: Disk quotas dquot_6.6.0
[    0.200913] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.201122] FS-Cache: Loaded
[    0.201346] CacheFiles: Loaded
[    0.211352] NET: Registered protocol family 2
[    0.212176] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.212242] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.212372] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.212577] TCP: Hash tables configured (established 8192 bind 8192)
[    0.212730] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.212796] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.213125] NET: Registered protocol family 1
[    0.213730] RPC: Registered named UNIX socket transport module.
[    0.213757] RPC: Registered udp transport module.
[    0.213779] RPC: Registered tcp transport module.
[    0.213800] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.215442] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
[    0.218485] Initialise system trusted keyrings
[    0.218685] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.228684] FS-Cache: Netfs 'nfs' registered for caching
[    0.229260] NFS: Registering the id_resolver key type
[    0.229312] Key type id_resolver registered
[    0.229334] Key type id_legacy registered
[    0.229366] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.231652] Key type asymmetric registered
[    0.231765] Asymmetric key parser 'x509' registered
[    0.231837] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    0.232022] io scheduler noop registered
[    0.232047] io scheduler deadline registered (default)
[    0.232255] io scheduler cfq registered
[    0.232279] io scheduler mq-deadline registered (default)
[    0.232304] io scheduler kyber registered
[    0.235312] bcm2708_fb soc:fb: FB found 1 display(s)
[    0.244260] Console: switching to colour frame buffer device 82x26
[    0.251072] bcm2708_fb soc:fb: Registered framebuffer for display 0, size 656x416
[    0.256804] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    0.260644] bcm2835-rng 3f104000.rng: hwrng registered
[    0.263390] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    0.268744] vc-sm: Videocore shared memory driver
[    0.271561] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[    0.287567] brd: module loaded
[    0.300288] loop: module loaded
[    0.303433] Loading iSCSI transport class v2.0-870.
[    0.306613] libphy: Fixed MDIO Bus: probed
[    0.309116] usbcore: registered new interface driver lan78xx
[    0.311631] usbcore: registered new interface driver smsc95xx
[    0.314113] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    0.344425] dwc_otg 3f980000.usb: base=(ptrval)
[    0.547121] Core Release: 2.80a
[    0.549571] Setting default values for core params
[    0.552090] Finished setting default values for core params
[    0.754867] Using Buffer DMA mode
[    0.757265] Periodic Transfer Interrupt Enhancement - disabled
[    0.759673] Multiprocessor Interrupt Enhancement - disabled
[    0.762070] OTG VER PARAM: 0, OTG VER FLAG: 0
[    0.764414] Dedicated Tx FIFOs mode
[    0.767101] WARN::dwc_otg_hcd_init:1045: FIQ DMA bounce buffers: virt = bad04000 dma = 0xfad04000 len=9024
[    0.771675] FIQ FSM acceleration enabled for :
               Non-periodic Split Transactions
               Periodic Split Transactions
               High-Speed Isochronous Endpoints
               Interrupt/Control Split Transaction hack enabled
[    0.782585] dwc_otg: Microframe scheduler enabled
[    0.782644] WARN::hcd_init_fiq:457: FIQ on core 1
[    0.784871] WARN::hcd_init_fiq:458: FIQ ASM at 80654f4c length 36
[    0.787082] WARN::hcd_init_fiq:497: MPHI regs_base at bb810000
[    0.789339] dwc_otg 3f980000.usb: DWC OTG Controller
[    0.791599] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    0.793936] dwc_otg 3f980000.usb: irq 56, io mem 0x00000000
[    0.796240] Init: Port Power? op_state=1
[    0.798478] Init: Power Port (0)
[    0.800890] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    0.805429] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.807847] usb usb1: Product: DWC OTG Controller
[    0.810213] usb usb1: Manufacturer: Linux 4.19.66-v7+ dwc_otg_hcd
[    0.812658] usb usb1: SerialNumber: 3f980000.usb
[    0.815611] hub 1-0:1.0: USB hub found
[    0.817885] hub 1-0:1.0: 1 port detected
[    0.820645] dwc_otg: FIQ enabled
[    0.820651] dwc_otg: NAK holdoff enabled
[    0.820657] dwc_otg: FIQ split-transaction FSM enabled
[    0.820667] Module dwc_common_port init
[    0.820939] usbcore: registered new interface driver usb-storage
[    0.823425] mousedev: PS/2 mouse device common for all mice
[    0.826599] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    0.829229] bcm2835-cpufreq: min=600000 max=1200000
[    0.832080] sdhci: Secure Digital Host Controller Interface driver
[    0.834493] sdhci: Copyright(c) Pierre Ossman
[    0.837264] mmc-bcm2835 3f300000.mmcnr: could not get clk, deferring probe
[    0.840172] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe
[    0.842882] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.846976] ledtrig-cpu: registered to indicate activity on CPUs
[    0.849750] hidraw: raw HID events driver (C) Jiri Kosina
[    0.852545] usbcore: registered new interface driver usbhid
[    0.855182] usbhid: USB HID core driver
[    0.858501] vchiq: vchiq_init_state: slot_zero = (ptrval), is_master = 0
[    0.862640] [vc_sm_connected_init]: start
[    0.871321] [vc_sm_connected_init]: end - returning 0
[    0.874887] Initializing XFRM netlink socket
[    0.877315] NET: Registered protocol family 17
[    0.879821] Key type dns_resolver registered
[    0.882688] Registering SWP/SWPB emulation handler
[    0.885773] registered taskstats version 1
[    0.888181] Loading compiled-in X.509 certificates
[    0.897716] uart-pl011 3f201000.serial: cts_event_workaround enabled
[    0.900256] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 81, base_baud = 0) is a PL011 rev2
[    1.902433] console [ttyAMA0] enabled
[    1.910462] mmc-bcm2835 3f300000.mmcnr: mmc_debug:0 mmc_debug2:0
[    1.918955] mmc-bcm2835 3f300000.mmcnr: DMA channel allocated
[    1.953342] sdhost: log_buf @ (ptrval) (fad07000)
[    1.995221] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    2.004644] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.013958] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.021620] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    2.030547] of_cfs_init
[    2.035150] of_cfs_init: OK
[    2.040481] Waiting for root device PARTUUID=b21c111b-02...
[    2.049660] Indeed it is in host mode hprt0 = 00021501
[    2.118837] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    2.134440] random: fast init done
[    2.158102] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.173328] mmc0: new high speed SDHC card at address 0007
[    2.182337] mmcblk0: mmc0:0007 Y16AG 14.5 GiB
[    2.191290]  mmcblk0: p1 p2
[    2.224456] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.237076] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    2.255689] devtmpfs: mounted
[    2.259416] mmc1: new high speed SDIO card at address 0001
[    2.269090] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.270698] Freeing unused kernel memory: 1024K
[    2.278459] Indeed it is in host mode hprt0 = 00001101
[    2.392123] Run /sbin/init as init process
[    2.532030] usb 1-1: New USB device found, idVendor=0424, idProduct=9514, bcdDevice= 2.00
[    2.545640] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.556330] hub 1-1:1.0: USB hub found
[    2.563020] hub 1-1:1.0: 5 ports detected
[    2.881750] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    2.971933] systemd[1]: System time before build time, advancing clock.
[    3.022056] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00, bcdDevice= 2.00
[    3.035988] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.048979] smsc95xx v1.0.6
[    3.117526] NET: Registered protocol family 10
[    3.126176] Segment Routing with IPv6
[    3.145397] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:68:98:76
[    3.164460] random: systemd: uninitialized urandom read (16 bytes read)
[    3.176746] random: systemd: uninitialized urandom read (16 bytes read)
[    3.192283] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[    3.219722] systemd[1]: Detected architecture arm.
[    3.242956] systemd[1]: Set hostname to <raspberrypi>.
[    3.320900] uart-pl011 3f201000.serial: no DMA platform data
[    3.330649] random: systemd-cryptse: uninitialized urandom read (16 bytes read)
[    3.814165] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    3.833103] systemd[1]: Listening on Journal Socket (/dev/log).
[    3.845469] systemd[1]: Listening on Journal Socket.
[    3.878724] systemd[1]: Listening on udev Control Socket.
[    3.891446] systemd[1]: Created slice System Slice.
[    3.908746] systemd[1]: Mounting RPC Pipe File System...
[    3.922062] systemd[1]: Created slice system-getty.slice.
[    4.003210] i2c /dev entries driver
[    4.501152] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    4.607027] systemd-journald[102]: Received request to flush runtime journal from PID 1
[    4.984887] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    4.987690] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    4.987713] [vc_sm_connected_init]: start
[    4.998155] [vc_sm_connected_init]: installed successfully
[    5.006771] media: Linux media interface: v0.10
[    5.039456] videodev: Linux video capture interface: v2.00
[    5.075577] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    5.075582] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    5.090493] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[    5.114108] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[    5.125423] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[    5.125436] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[    5.133650] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[    5.133664] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[    5.141295] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[    5.141308] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[    5.336412] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    5.405353] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    5.530172] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
[    5.538392] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[    5.538657] usbcore: registered new interface driver brcmfmac
[    5.796865] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[    5.796960] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[    5.797831] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f
[    6.933252] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:102396k SSFS
[    7.037669] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[    7.037689] brcmfmac: power management disabled
[    7.382959] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[    7.383385] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    8.071756] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    8.483562] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[    9.003868] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
[  190.769093] random: crng init done
[  190.769104] random: 7 urandom warning(s) missed due to ratelimiting

Code: Select all

lsmod
Module                  Size  Used by
sc16is7xx              20480  0
brcmfmac              311296  0
brcmutil               16384  1 brcmfmac
sha256_generic         20480  0
cfg80211              614400  1 brcmfmac
rfkill                 28672  4 cfg80211
raspberrypi_hwmon      16384  0
hwmon                  16384  1 raspberrypi_hwmon
i2c_bcm2835            16384  0
bcm2835_codec          36864  0
bcm2835_v4l2           45056  0
v4l2_mem2mem           24576  1 bcm2835_codec
bcm2835_mmal_vchiq     32768  2 bcm2835_codec,bcm2835_v4l2
v4l2_common            16384  1 bcm2835_v4l2
videobuf2_dma_contig    20480  1 bcm2835_codec
videobuf2_vmalloc      16384  1 bcm2835_v4l2
videobuf2_memops       16384  2 videobuf2_dma_contig,videobuf2_vmalloc
videobuf2_v4l2         24576  3 bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem
videobuf2_common       45056  4 bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
videodev              200704  6 bcm2835_codec,v4l2_common,videobuf2_common,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
media                  36864  2 videodev,v4l2_mem2mem
vc_sm_cma              36864  1 bcm2835_mmal_vchiq
fixed                  16384  0
uio_pdrv_genirq        16384  0
uio                    20480  1 uio_pdrv_genirq
i2c_dev                20480  0
ip_tables              24576  0
x_tables               32768  1 ip_tables
ipv6                  450560  24

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

Re: SC16IS752 attachment as serial

Thu Jun 17, 2021 9:26 pm

The i2c_gpio parameters are wrong and unnecessary, but otherwise it looks good.

skrishnamoorthy
Posts: 4
Joined: Thu Jun 17, 2021 5:24 pm

Re: [SOLVED] SC16IS752 attachment as serial

Wed Jun 30, 2021 11:51 pm

Hello,

I have a follow up question - everything works fine but one thing I was curious about was that I can't seem to close the port on python once I've opened it with serial.close(). Is there any way around it? If I have to run the same code multiple times and set up the port, I have to power cycle the chip.

Thanks!

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

Re: [SOLVED] SC16IS752 attachment as serial

Thu Jul 01, 2021 1:01 pm

That does sound odd. You can get an idea of what might still have the port open using lsof:

Code: Select all

$ sudo apt install lsof
$ sudo lsof /dev/ttySC0
You might also find some useful information in /sys/class/tty/ttySC0/*:

Code: Select all

$ grep -s . /sys/class/tty/ttySC0/*

skrishnamoorthy
Posts: 4
Joined: Thu Jun 17, 2021 5:24 pm

Re: [SOLVED] SC16IS752 attachment as serial

Thu Jul 01, 2021 3:51 pm

Thank you. I will check this out and revert. It might also just be an issue with the sensor I am connecting. I set my sensor to streaming mode but when I shut the stream, its transmission line voltage seems to be in an active state indicated by an LED I have in the line. I'll investigate further.

Return to “Device Tree”