-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Atmel SAM V71 UART_0 fail #29111
Comments
ok, I did some debug work in the meantime, it appear that in 'UART_0' - 'uart_console_dev' is null, in 'uart_console.c' , while when in the original settings it is not. what am I missing ? |
I did some more debugging - it appear that only usart_1 is define in 'device' - I saw that in function
|
Hi @y2sh . I'm not complete sure if there is a bug. Let's check how do you should define at board first. SAM's are using pinctrl to manage pins. In the case of UART0, pins are already defined here: zephyr/dts/arm/atmel/same70.dtsi Lines 143 to 151 in c765b92
Then, at board level, you need define the proper UART port on the device tree. Let's check how we defined USART1 for SAM_V71: zephyr/boards/arm/sam_v71_xult/sam_v71_xult-common.dtsi Lines 21 to 23 in c765b92
finally, you need enable the node and set required speed: zephyr/boards/arm/sam_v71_xult/sam_v71_xult-common.dtsi Lines 171 to 174 in c765b92
Could you try define above steps and build hello world? |
YES !! I solved it ! |
Ahh,,,sure forgot to mention :D , we use Kconfig to define the rule that builds the files: zephyr/drivers/serial/CMakeLists.txt Lines 24 to 25 in 8d563d6
So, yes, you need enable the desired driver there. It can be by a conf or a defconfig file, since you are using overlays. Try look at Now it is working, I would recommend you "copy" the SAM_V71_XULT board and rename to your own board. Then add your changes there. It will be easier add things on one place instead add overlays/conf on every sample/app that you will touch. Anyway, it is just a suggestion. |
Describe the bug
Hi, I have an eval board of Atmel - SAMV71 Xplained. I succeed to download the sample code of 'Hello Word', it works great.
However, when I tried to change the console to uart0 - the code stuck at fatal.c , without recover.
To Reproduce
Add the following line in "prj.conf":
CONFIG_UART_CONSOLE_ON_DEV_NAME="UART_0"
Add file "v71.overlay":
&uart0 {
status = "okay";
current-speed = < 0x1c200 >;
};
Add the following line in "CMakeLists.txt":
set(DTC_OVERLAY_FILE v71.overlay)
The changes are taking effect on the build output - I can see it in "\build\zephyr\.config" and in "\build\zephyr\zephyr.dts"
Expected behavior
The reason I need the output in uart0 is because I have other custom board with v71 which it's output console in uart0. After lots of unsuccessful tries I go back to the eval board, and also in the eval board it failed - stuck in fatal.c
Impact
showstopper
Environment
The text was updated successfully, but these errors were encountered: