-
Couldn't load subscription status.
- Fork 8.1k
Add mcxn236 smartdma support #92058
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
Add mcxn236 smartdma support #92058
Conversation
| chosen { | ||
| zephyr,uart-mcumgr = &flexcomm0_lpuart0; | ||
| zephyr,console = &flexcomm0_lpuart0; | ||
| zephyr,shell-uart = &flexcomm0_lpuart0; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems these chosen node are not video-specific. Could you explain why we don't set it elsewhere (e.g, board's dts) but need to set it here in the video capture sample overlay ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ngphibang , the default console pins(P1_8,P1_9) are duplicated with camera header. So I chose another flexcomm(flexcomm0_lpuart0) as smartdma_camera serial output.

| @@ -0,0 +1,2 @@ | |||
| CONFIG_VIDEO_BUFFER_POOL_SZ_MAX=40000 | |||
| CONFIG_VIDEO_BUFFER_POOL_NUM_MAX=2 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CONFIG_VIDEO_BUFFER_POOL_NUM_MAX is set to 2 by default so this is not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reminder, I will update.
|
@NeilChen93 the sample fails on frdm_mcxn947, due to hal upgrade sdma, so it is fixed now? |
|
@hakehuang It is fixed by #91760 (comment) (sorry not to inform you as I think you were aware of it). The problem was finally found due to ov7670 init sequence (not sdma) |
@ngphibang, @NeilChen93 can you help to add and it fails at my frdm_mcxn947 board |
74411e6 to
639bff4
Compare
|
Hi @hakehuang , using below command, it can work fine on my side. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add - video to <platform.yaml> support list
I will get another camera to try, but it looks not like camera issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case the error for MCXN236 is the same as the error for MCXN947:
If so, then this PR is probably not causing this error.
|
|
||
| dvp_20pin_i2c: &flexcomm2_lpi2c2 {}; | ||
|
|
||
| dvp_20pin_interface: &video_sdma {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should have been enough for allowing the chosen { zephyr,camera = <...>; } to take effect through the shield:
zephyr/boards/shields/dvp_20pin_ov7670/dvp_20pin_ov7670.overlay
Lines 9 to 11 in 6c68584
| chosen { | |
| zephyr,camera = &dvp_20pin_interface; | |
| }; |
Not sure yet why there is the CI error...
/__w/zephyr/zephyr/include/zephyr/device.h:96:41: error: '__device_dts_ord_DT_CHOSEN_zephyr_camera_ORD' undeclared (first use in this function)
96 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~~~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe because of not use the full board name frdm_mcxn236/mcxn236 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe because of not use the full board name
frdm_mcxn236/mcxn236?
yes this should be change to frdm_mcxn236/mcxn236, the extra_config only accept full name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - mimxrt1170_evk/mimxrt1176/cm7 | ||
| - mimxrt1170_evk@B/mimxrt1176/cm7 | ||
| - frdm_mcxn947/mcxn947/cpu0 | ||
| - frdm_mcxn236 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be full name frdm_mcxn236/mcxn236 ?
| - platform:mimxrt1170_evk/mimxrt1176/cm7:SHIELD="nxp_btb44_ov5640;rk055hdmipi4ma0" | ||
| - platform:mimxrt1170_evk@B/mimxrt1176/cm7:SHIELD="nxp_btb44_ov5640;rk055hdmipi4ma0" | ||
| - platform:frdm_mcxn947/mcxn947/cpu0:SHIELD="dvp_20pin_ov7670;lcd_par_s035_8080" | ||
| - platform:frdm_mcxn236:SHIELD="dvp_20pin_ov7670;lcd_par_s035_8080" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be full name frdm_mcxn236/mcxn236 ?
|
|
||
| dvp_20pin_i2c: &flexcomm2_lpi2c2 {}; | ||
|
|
||
| dvp_20pin_interface: &video_sdma {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe because of not use the full board name frdm_mcxn236/mcxn236 ?
I change to another camera which has the same problem. |
Add smartdma nodes to NXP MCXN23x dtsi file Signed-off-by: Neil Chen <[email protected]>
Support smartdma and flexcomm0 for NXP frdm_mcxn236 board. The default console pins are duplicated with camera header pins, so add flexcomm0_lpuart0 for smartdma_camera serial output. Signed-off-by: Neil Chen <[email protected]>
Maybe the same issue related to log as described here ? |
Add support for using the SMARTDMA engine on the FRDM-MCXN236 board with the video capture sample. Replace console pins, because default console pins(P1_8, P1_9) are duplicated with camera header pins. Signed-off-by: Neil Chen <[email protected]>
Add video support in frdm_mcxn947 board yaml Signed-off-by: Neil Chen <[email protected]>
639bff4 to
33667b4
Compare
|
you should use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a failure in samples/driver/video/capture which reported in #92299
but not related to this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thank you for the changes!
I am adding a DNM flag so that it does not accidentally arrive in the merge-list before NXP and others could decide if it is ok to add it now that we are in feature-freeze (4.2-rc1 released)
Feel free to remove the DNM flag!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The failure with mcxn947 is not related to this PR (CONFIG_TEST is an additional test that helps to automatically detects issues without human check, it is not a CI test to pass ...)
|
Please add information about this support and how to test it in the documentation page. |
|
Moving to 4.3 milestone as this is a new feature |




Add support for using the SMARTDMA engine on the FRDM-MCXN236 board with the video capture sample.