2024-08-15 07:37 AM - edited 2024-08-20 08:49 AM
x linux-5.15-stm32mp-r2 for our puposes. I have also attached the pps-gpio source code in case it is useful.
Solved! Go to Solution.
2024-08-15 01:14 PM
Hello @VivekB ,
Please let me summarize your case just for me to be sure to fully understand your issue (thank you for the complete summary of your case) :
You configure SPI1 as SPI master of 5 different slaves (as I see in your device tree). You define yourself 5 GPIOs for CS pins (not use the native HW NSS one which would be <0> ) to drive the CS lines of the different slave you want to talk to.
At first boot, everything looks to work well, you can receive information from your measurement SPI slave module on request, and you have also a module that send you a 0 pulse regularly on a lane driven by your pps driver. (By the way, can you put me the source code of this one please, I think it did not pass in attachment of your first message).
After processing a soft reboot (can you put me the command you use ?), the system restart, driver reprobes, but the PPS driver looks to not work correctly, as you are sure that the pulse still come into MP15, but it is not updated from a SW point of view. When you disable the drive of another GPIO of the same bank (the one used as CS for another slave), the problem seems to not appear, so you think there is a correlation between both.
Sorry it is a little bit long but I want to be sure to not miss anything.
Now concerning my questions :
Kind regards,
Erwan.
2024-08-15 01:14 PM
Hello @VivekB ,
Please let me summarize your case just for me to be sure to fully understand your issue (thank you for the complete summary of your case) :
You configure SPI1 as SPI master of 5 different slaves (as I see in your device tree). You define yourself 5 GPIOs for CS pins (not use the native HW NSS one which would be <0> ) to drive the CS lines of the different slave you want to talk to.
At first boot, everything looks to work well, you can receive information from your measurement SPI slave module on request, and you have also a module that send you a 0 pulse regularly on a lane driven by your pps driver. (By the way, can you put me the source code of this one please, I think it did not pass in attachment of your first message).
After processing a soft reboot (can you put me the command you use ?), the system restart, driver reprobes, but the PPS driver looks to not work correctly, as you are sure that the pulse still come into MP15, but it is not updated from a SW point of view. When you disable the drive of another GPIO of the same bank (the one used as CS for another slave), the problem seems to not appear, so you think there is a correlation between both.
Sorry it is a little bit long but I want to be sure to not miss anything.
Now concerning my questions :
Kind regards,
Erwan.
2024-08-16 02:21 AM - edited 2024-08-20 08:50 AM
Thanks Erwan.
2024-08-17 05:35 AM
Hello @VivekB ,
Having a deeper look in your description and in your files, and some things to check I think.
First, the fact that you cannot rmmod and insmod your drivers properly is a bad sign. It means that something is not well covered in your remove function. Yes maybe it could be interesting to share me the different logs concerning this topic.
In the first boot of the platform, do you also see this message "SPI driver stpm3x has no spi_device_id for st,stpm33" ?
Did you try to do step by step probing on stpm33 driver to see exactly which instruction make the things going bad ?
Kind regards,
Erwan.