[SOLVED] Odroid C4 pin multiplex function.

Post Reply
User avatar
Faradn
Posts: 49
Joined: Sun Feb 10, 2019 2:19 am
languages_spoken: english
ODROIDs: Odroid XU4
Has thanked: 0
Been thanked: 3 times
Contact:

[SOLVED] Odroid C4 pin multiplex function.

Post by Faradn » Wed May 13, 2020 4:07 am

SBC: Odroid C4
OS: Ubuntu 20.04 LTS
Linux odroid 4.9.218-13 #1 SMP PREEMPT Tue Apr 21 20:02:01 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux

Since the peripherals for the C4 are identically mapped as the N2,
it was quite easy to port my S922X (N2) GPIO library over to the S905X3 (C4).
The library supports GPIO, PWM, I2C, & SPI.

However I'm finding the GPIO pin multiplex operation is not working.
Example: I want to configure GPIOX_5 (phys pin 33) as the PWM_C output. I call a method to
set GPIOX_5 to function 0x4, read the GPIOX_5 pin multiplex value and I see 0x4.
I run 'sudo gpio readall -a' and I do not see the ALT4 function for GPIOX_5 (phys
pin #33). I run the exact same program (N2 version) on my N2 and I can see the 'ALT4'
in the response from 'sudo gpio readall -a'.

Anyone else experiencing any issues with the C4 S905X3 pin multiplex operation?

TIA,
/Faradn
- Odroid N2 2Gb - Odroid C4 4Gb - Odroid XU4 2Gb - RockPro64 4Gb - Pi 3B 1Gb -
These users thanked the author Faradn for the post:
rooted (Thu May 14, 2020 8:29 am)

User avatar
Faradn
Posts: 49
Joined: Sun Feb 10, 2019 2:19 am
languages_spoken: english
ODROIDs: Odroid XU4
Has thanked: 0
Been thanked: 3 times
Contact:

Re: Odroid C4 pin multiplex function.

Post by Faradn » Thu May 14, 2020 6:06 am

UPDATE:
I tried programming GPIOX_3 (phys pin 11) for PWM_D and it worked. :)
Still don't know why the PWM_C interface cannot be programmed.

User avatar
odroid
Site Admin
Posts: 34091
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 662 times
Been thanked: 609 times
Contact:

Re: Odroid C4 pin multiplex function.

Post by odroid » Thu May 14, 2020 8:15 am

Can you show us "lsmod" output?

User avatar
Faradn
Posts: 49
Joined: Sun Feb 10, 2019 2:19 am
languages_spoken: english
ODROIDs: Odroid XU4
Has thanked: 0
Been thanked: 3 times
Contact:

Re: Odroid C4 pin multiplex function.

Post by Faradn » Fri May 15, 2020 7:37 am

Hello @Odroid,
Here is the response from lsmod:
xt_multiport 16384 6
iptable_filter 16384 1
ip6table_filter 16384 1
ip6_tables 28672 1 ip6table_filter
fuse 110592 3
cpufreq_ondemand 20480 0
cpufreq_powersave 16384 0
cpufreq_userspace 16384 0
cpufreq_conservative 16384 0
i2c_meson_master 20480 0
amvdec_ports 196608 0
squashfs 49152 6
sch_fq_codel 20480 2
amvdec_vp9 122880 0
amvdec_vc1 65536 0
amvdec_real 45056 0
amvdec_mmpeg4 40960 0
amvdec_mpeg4 65536 0
amvdec_mpeg12 106496 0
amvdec_mmjpeg 28672 0
amvdec_mjpeg 40960 0
amvdec_h265 147456 0
amvdec_h264mvc 57344 0
amvdec_mh264 159744 0
amvdec_h264 147456 0
amvdec_avs 69632 0
stream_input 180224 9 amvdec_h265,amvdec_mh264,amvdec_h264mvc,amvdec_ports,amvdec_real,amvdec_vp9,amvdec_h264,amvdec_mpeg12,amvdec_avs
decoder_common 188416 15 amvdec_h265,amvdec_mjpeg,amvdec_mh264,amvdec_mmpeg4,amvdec_h264mvc,amvdec_mmjpeg,amvdec_ports,amvdec_real,stream_input,amvdec_vp9,amvdec_h264,amvdec_mpeg12,amvdec_avs,amvdec_vc1,amvdec_mpeg4
firmware 28672 15 amvdec_h265,amvdec_mjpeg,amvdec_mh264,amvdec_mmpeg4,amvdec_h264mvc,amvdec_mmjpeg,decoder_common,amvdec_real,stream_input,amvdec_vp9,amvdec_h264,amvdec_mpeg12,amvdec_avs,amvdec_vc1,amvdec_mpeg4
media_clock 45056 10 amvdec_h265,amvdec_mh264,decoder_common,amvdec_ports,firmware,stream_input,amvdec_vp9,amvdec_h264,amvdec_mpeg12,amvdec_avs
ip_tables 28672 1 iptable_filter
x_tables 49152 5 xt_multiport,ip_tables,iptable_filter,ip6table_filter,ip6_tables
ipv6 466944 62
spidev 20480 0
spi_meson_spicc 20480 0

/Faradn

User avatar
tony.hong
Posts: 119
Joined: Tue Jun 04, 2019 1:49 pm
languages_spoken: korean
ODROIDs: All
Location: korea
Has thanked: 26 times
Been thanked: 35 times
Contact:

Re: Odroid C4 pin multiplex function.

Post by tony.hong » Fri May 15, 2020 10:28 am

N2's PIN_33 is GPiOX_5. But C4's PIN_33 is GPIOX_6.
C4 and N2 pin-maps are slightly different.

User avatar
tony.hong
Posts: 119
Joined: Tue Jun 04, 2019 1:49 pm
languages_spoken: korean
ODROIDs: All
Location: korea
Has thanked: 26 times
Been thanked: 35 times
Contact:

Re: Odroid C4 pin multiplex function.

Post by tony.hong » Fri May 15, 2020 10:32 am

And If you frequently change the interface, see viewtopic.php?f=55&t=36220.

User avatar
Faradn
Posts: 49
Joined: Sun Feb 10, 2019 2:19 am
languages_spoken: english
ODROIDs: Odroid XU4
Has thanked: 0
Been thanked: 3 times
Contact:

Re: Odroid C4 pin multiplex function.

Post by Faradn » Sat May 16, 2020 3:06 am

Thank you @tony.hong, you are correct.
GPIOX_5 (phys pin 7) is PMC_C.
Now working.

/Faradn

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 0 guests