2019-06-26 09:54 AM
We are a connecting a sensor to M4 side and reading the data through UART7. UART7 is enabled for M4 by modifying the Linux Kernel Device tree and TF-A .dtsi files.
Device tree file for TF-A is generated through STM32CubeMX. and Placed the generated files in the /fdts folder of TF-A(Which was downloaded from stm git) and built it and loaded to the board using the given procedure.
We are able to read the UART data correctly when OPENAMP_Init() is not used.
This is blocker for our project and urgent help would be appreciated.
Thank you.
2019-07-01 09:07 AM
Hi @Community member ,
I have tried multiple times changes the stack size, ipcc region boundaries but the result is same. Invalid data from UART.
Please help how to debug this issue.
This is blocker for us.
Best Regards,
Upendar Reddy
2019-07-02 02:59 AM
Hi @USama
Did you manage to instrument your code with log traces ?
Else, it will require sometime in order we reproduce your issue.
Keep you posted
Olivier
2019-07-02 06:53 AM
Hi @USama
Thanks for your trial about stack. We can eliminate this assumption.
Several other suggestions for trials :
Hope it help
Olivier
2019-07-02 06:56 AM
2019-07-04 02:43 AM
Hi @USama
I have generated a project from scratch with CubeMX using UART7 and OpenAMP and didn't notice any issue with UART7 when OpenAMP is initialized.
Did you manage to instrument your code or perform a step by step debug in order trying to catch something ?
Looking at your project we have noticed a problem with DMA2 you initialize in M4 side while not assigned to m4 context in DeviceTree.
Could you please also tell us how is powered your sensor ?
Did you check it's still properly powered in case you get 0s ?
Hope it help
Olivier
2019-07-04 02:54 AM
Hi Olivier, Thanks for the feedback. I am currently building a new image with generated device tree files. ( I am following a method given in How to Build your machine) I am assuming you also did the same thing. I didn't do the code instrumentation as of now. I am trying establish UART communication with another DK2 board and assess the issue if there is any problem with the sensor. May you could share some info on device tree build. Best Regards, Upendar Reddy
2019-07-04 05:20 AM
Hi @USama
Sorry I'm a bit lost. In your original post you mentioned you properly followed a procedure to rebuild dts and TF-A ...
And now I understand you didn't ? Can you please clarify ?
Thanks
Olivier
2019-07-04 09:28 AM
2019-07-04 01:54 PM
Hi Upendar,
Since you don't target to modify the kernel configuration or need to add specific package to the distribution the Developer package method look faster for me.
But both might work.
I think you went through https://wiki.st.com/stm32mpu/wiki/STM32MP1_Developer_Package to setup your environnement
Don't forget to use the tips to add green light on in kernel DT and a custom trace in TF-A to quickly confirm you are well booted on your new generated files.
Note that issue around DMA2 does not come from a problem of compilation but rather a problem of configuration in CubeMX.
Hope it help
Olivier
2019-07-05 10:58 AM
Hi Olivier,
Do mean to suggest to modify the given dts file(stm32mp157c-dk2.dts) with cubeMX generated file? I tried a different way. Placing the cubeMX generated dts file in the dts folder and adding the name in Makefile. But that seems not be working.
and Yes. I did enable the green LED in dts file. The light is glowing. But when i checked the status of the USART3 peripheral using
cat /proc/device-tree/m4\@0/m4_system_resources/serial\@4000f000 , result came as disabled even though it is enabled.
And there are multiple device trees exist in the kernel, and while booting up it is asking which one to take. But the one i added is not coming there. How can i configure that?
I know its all too messy right now. I need little bit help in understanding these things. :)
Thank you.
Best Regards,
Upendar