Hello there,
I'm working on an iMX95 evk board and need to generate a low-frequency clock (32kHz) on the CCM_CLKO4 pin. As far as I understand from the reference manual, it's possible to achieve that functionality on that pin, however, I can't get it working.
I also tried to change the registers ( SW_PAD_CTL_PAD_CCM_CLKO4, SW_MUX_CTL_PAD_CCM_CLKO4, and CLOCK_ROOT72_CONTROL_REGISTER) from userspace using memtool, but the access seems blocked (results in "bus dump").
Can someone please explain how clock generation works on iMX devices and if someone knows how to achieve that on iMX95?
Thanks a lot
Hi,
Thank you for your interest in NXP Semiconductor products,
Try adding the pin to a node within DTS for pinmuxing, then in userspace writing to CLOCK_ROOT_CONTROL.
&scmi_iomuxc {
...
pinctrl-0 = <&pinctrl_hog>;
pinctrl_hog: hoggrp {
fsl,pins = <
IMX95_PAD_CCM_CLKO4__CCMSRCGPCMIX_TOP_CLKO_4 <PAD_CTRL>
>;
};
...
};
Regards
Hi @JosephAtNXP ,
Thanks for the answer.
I tried what you suggested, and here's what I found:
&scmi_iomuxc {
//TBT clock output on CCM_CLKO4
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog>;
pinctrl_hog: hoggrp {
fsl,pins = <
IMX95_PAD_CCM_CLKO4__CCMSRCGPCMIX_TOP_CLKO_4 0x0000111E
>;
};
}
(Note: That pad ctrl means -> shmit input, no open drain, no pull up, no pull down, slightly fast rate, drive strength x4)
And I got nothing on the pin.
Then, I tried to use memtool:
(addr: 0x44450000 + 0x2400 --> CLOCK_ROOT_CONTROL72 = ccm_clko4):
imx95-verdin-custom:/unit_tests# ./memtool 44452400 1
E
Reading 0x1 count starting at address 0x44452400
[ 1403.693064] audit: type=1701 audit(1709056342.728:36): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=622 comm="memtool" exe="/unit_tests/memtool" sig=7 res=1
Bus error (core dumped)
got core dump.
What's wrong? Could you replicate my setup to check if what you suggested works for you?
Thanks for the support