Clock conflict when booting M7 from U-Boot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Clock conflict when booting M7 from U-Boot

2,463 Views
Thinh
Contributor III

Hello NXP Supporters,

I created a simple app on M7 with feature IPCF, FlexCAN and I want to start M7 app in U-boot by startm7 command (Please check my complete project).

I. I follow below commands to start M7 app:

1. dcache off

2. mw.q 0x34100000 0x0 0x40000

3. fatload mmc 0:1 0x80000000 IPCF_Example_S32G399A_M7_0.bin

4. cp.b 0x80000000 0x34300000 0x300000

5. startm7 0x34500400

6. boot

II. Running with Clock_Ip_Init

If I running with Clock_Ip_Init, U-boot will stop immediately after startm7 command, as i understand clock is already initialized, if i run this command clock will re-init then u-boot broken

Thinh_5-1765454991667.png

Thinh_6-1765455070515.png

If i running without Clock_Ip_Init, everything is normal except CAN, i think CAN clock is not same as i config then CAN baudrate is wrong, i receive a error CAN frame

Thinh_4-1765453819091.pngThinh_3-1765453804526.png

III. Try CAN working by boot M7 only by Flash and IVT blob image:

I also try run M7 app only with Clock_Ip_Init, CAN is running normal, that mean clock for CAN config is ok.

Thinh_0-1765453596125.png

Thinh_2-1765453674275.png

=> Please help/suggest how to keep CAN working when boot M7 app from U-boot ?

Tags (1)
0 Kudos
Reply
5 Replies

2,404 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @Thinh 

Thanks for your post.

1. From A core side, the CAN clock may set by the TFA, which may not fulfill the settings used from M core side, so that the CAN may not work correctly with your M core applications

2. For running M core and A core applications simultaneously, it is suggested following the way shown in AN13750, not directly via the u-boot.

 

BR

Chenyin

0 Kudos
Reply

2,390 Views
Thinh
Contributor III

Hello @chenyin_h,

Thank for your response,

Our long-term goal is build bootloader to boot for A53, M7,... simultaneously (following AN13750)

but in short-term, we need to bring everything up to proof of concept first, can you mention the name of document or link that i can refer to do the option 1 (config/rebuild TFA) ?

0 Kudos
Reply

2,381 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @Thinh 

Thanks for your reply.

1. Sorry that there is not a formal document existed for running M core application from u-boot.

2. Generally, if you do want to start the M7 application from A core side(uboot), then you may check if the corresponding resources(like pin/memory/clock) would not be initialized or used simultaneously, you may try only setting the resources on one side to avoid confliction. 

Usually, it does not only need to reconfigure/build TFA/uboot/linux, but also need additional code changes on M/A side according to different requirments.

 

BR

Chenyin

0 Kudos
Reply

2,420 Views
Thinh
Contributor III

Hi @Joey_z@alejandro_e 

Do you have any suggestion ?

Sorry for this inconvenient.

0 Kudos
Reply

2,358 Views
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @Thinh,

As mentioned by my colleague @chenyin_h, the bootflow you are using is not a setup we encounter frequently and thus, we cannot offer much support on it. I would also recommend creating a multi-core bootloader based on the AN13750, and also please check the Bootloader-User-Manual.pdf that comes with the GoldVIP package. 

To avoid mixing topics, please create a new post or a new support ticket for the bootloader topic if you need guidance from our side.

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2260224%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EClock%20conflict%20when%20booting%20M7%20from%20U-Boot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2260224%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20NXP%20Supporters%2C%3C%2FP%3E%3CP%3EI%20created%20a%20simple%20app%20on%20M7%20with%20feature%20%3CSTRONG%3EIPCF%3C%2FSTRONG%3E%2C%20%3CSTRONG%3EFlexCAN%3C%2FSTRONG%3E%20and%20I%20want%20to%20%3CSTRONG%3Estart%20M7%20app%20in%20U-boot%3C%2FSTRONG%3E%20by%20startm7%20command%20(Please%20check%20my%20complete%20project).%3C%2FP%3E%3CP%3E%3CSTRONG%3EI.%20I%20follow%20below%20commands%20to%20start%20M7%20app%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E1.%20dcache%20off%3C%2FP%3E%3CP%3E2.%20mw.q%200x34100000%200x0%200x40000%3C%2FP%3E%3CP%3E3.%20fatload%20mmc%200%3A1%200x80000000%20IPCF_Example_S32G399A_M7_0.bin%3C%2FP%3E%3CP%3E4.%20cp.b%200x80000000%200x34300000%200x300000%3C%2FP%3E%3CP%3E5.%20startm7%200x34500400%3C%2FP%3E%3CP%3E6.%20boot%3C%2FP%3E%3CP%3E%3CSTRONG%3EII.%20Running%20with%20Clock_Ip_Init%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EIf%20I%20running%20with%20Clock_Ip_Init%2C%20U-boot%20will%20stop%20immediately%20after%20startm7%20command%2C%20as%20i%20understand%20clock%20is%20already%20initialized%2C%20if%20i%20run%20this%20command%20clock%20will%20re-init%20then%20u-boot%20broken%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Thinh_5-1765454991667.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_5-1765454991667.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_5-1765454991667.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_5-1765454991667.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F369528i5809C21345A0945C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Thinh_5-1765454991667.png%22%20alt%3D%22Thinh_5-1765454991667.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Thinh_6-1765455070515.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_6-1765455070515.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_6-1765455070515.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_6-1765455070515.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F369529iE514E1B79C7AFE81%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Thinh_6-1765455070515.png%22%20alt%3D%22Thinh_6-1765455070515.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EIf%20i%20running%20without%20Clock_Ip_Init%2C%20everything%20is%20normal%20except%20CAN%2C%20i%20think%20CAN%20clock%20is%20not%20same%20as%20i%20config%20then%20CAN%20baudrate%20is%20wrong%2C%20i%20receive%20a%20error%20CAN%20frame%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Thinh_4-1765453819091.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_4-1765453819091.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_4-1765453819091.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_4-1765453819091.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F369527iD8DDA60DF6F61BF7%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Thinh_4-1765453819091.png%22%20alt%3D%22Thinh_4-1765453819091.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Thinh_3-1765453804526.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_3-1765453804526.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_3-1765453804526.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_3-1765453804526.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F369526i24343115D2379002%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Thinh_3-1765453804526.png%22%20alt%3D%22Thinh_3-1765453804526.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EIII.%20Try%20CAN%20working%20by%20boot%20M7%20only%20by%20Flash%20and%20IVT%20blob%20image%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20also%20try%20run%20M7%20app%20only%20with%20Clock_Ip_Init%2C%20CAN%20is%20running%20normal%2C%20that%20mean%20clock%20for%20CAN%20config%20is%20ok.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Thinh_0-1765453596125.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_0-1765453596125.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_0-1765453596125.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_0-1765453596125.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F369523iB15CAA05BCD59DD0%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Thinh_0-1765453596125.png%22%20alt%3D%22Thinh_0-1765453596125.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Thinh_2-1765453674275.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_2-1765453674275.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_2-1765453674275.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Thinh_2-1765453674275.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F369525i72327E5C59934240%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Thinh_2-1765453674275.png%22%20alt%3D%22Thinh_2-1765453674275.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3D%26gt%3B%20Please%20help%2Fsuggest%20how%20to%20keep%20CAN%20working%20when%20boot%20M7%20app%20from%20U-boot%20%3F%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2260751%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Clock%20conflict%20when%20booting%20M7%20from%20U-Boot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2260751%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24163%22%20target%3D%22_blank%22%3E%40chenyin_h%3C%2FA%3E%2C%3C%2FP%3E%3CP%3EThank%20for%20your%20response%2C%3C%2FP%3E%3CP%3EOur%20long-term%20goal%20is%20build%20bootloader%20to%20boot%20for%20A53%2C%20M7%2C...%20simultaneously%20(following%20AN13750)%3C%2FP%3E%3CP%3Ebut%20in%20short-term%2C%20we%20need%20to%20bring%20everything%20up%20to%20proof%20of%20concept%20first%2C%20can%20you%20mention%20the%20name%20of%20document%20or%20link%20that%20i%20can%20refer%20to%20do%20the%20option%201%20(config%2Frebuild%20TFA)%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2260660%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Clock%20conflict%20when%20booting%20M7%20from%20U-Boot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2260660%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F253723%22%20target%3D%22_blank%22%3E%40Thinh%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20post.%3C%2FP%3E%0A%3CP%3E1.%20From%20A%20core%20side%2C%20the%20CAN%20clock%20may%20set%20by%20the%20TFA%2C%20which%20may%20not%20fulfill%20the%20settings%20used%20from%20M%20core%20side%2C%20so%20that%20the%20CAN%20may%20not%20work%20correctly%20with%20your%20M%20core%20applications%3C%2FP%3E%0A%3CP%3E2.%20For%20running%20M%20core%20and%20A%20core%20applications%20simultaneously%2C%20it%20is%20suggested%20following%20the%20way%20shown%20in%20AN13750%2C%20not%20directly%20via%20the%20u-boot.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EChenyin%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2260593%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Clock%20conflict%20when%20booting%20M7%20from%20U-Boot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2260593%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F236188%22%20target%3D%22_blank%22%3E%40Joey_z%3C%2FA%3E%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F238460%22%20target%3D%22_blank%22%3E%40alejandro_e%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20you%20have%20any%20suggestion%20%3F%3C%2FP%3E%3CP%3ESorry%20for%20this%20inconvenient.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2261149%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Clock%20conflict%20when%20booting%20M7%20from%20U-Boot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2261149%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F253723%22%20target%3D%22_blank%22%3E%40Thinh%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20reply.%3C%2FP%3E%0A%3CP%3E1.%20Sorry%20that%20there%20is%20not%20a%20formal%20document%20existed%20for%20running%20M%20core%20application%20from%20u-boot.%3C%2FP%3E%0A%3CP%3E2.%20Generally%2C%20if%20you%20do%20want%20to%20start%20the%20M7%20application%20from%20A%20core%20side(uboot)%2C%20then%20you%20may%20check%20if%20the%20corresponding%20resources(like%20pin%2Fmemory%2Fclock)%20would%20not%20be%20initialized%20or%20used%20simultaneously%2C%20you%20may%20try%20only%20setting%20the%20resources%20on%20one%20side%20to%20avoid%20confliction.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUsually%2C%20it%20does%20not%20only%20need%20to%20reconfigure%2Fbuild%20TFA%2Fuboot%2Flinux%2C%20but%20also%20need%20additional%20code%20changes%20on%20M%2FA%20side%20according%20to%20different%20requirments.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EChenyin%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2261414%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Clock%20conflict%20when%20booting%20M7%20from%20U-Boot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2261414%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F253723%22%20target%3D%22_blank%22%3E%40Thinh%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EAs%20mentioned%20by%20my%20colleague%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24163%22%20target%3D%22_blank%22%3E%40chenyin_h%3C%2FA%3E%2C%20the%20bootflow%20you%20are%20using%20is%20not%20a%20setup%20we%20encounter%20frequently%20and%20thus%2C%20we%20cannot%20offer%20much%20support%20on%20it.%20I%20would%20also%20recommend%20creating%20a%20multi-core%20bootloader%20based%20on%20the%20AN13750%2C%20and%20also%20please%20check%20the%26nbsp%3B%3CEM%3EBootloader-User-Manual.pdf%26nbsp%3B%3C%2FEM%3Ethat%20comes%20with%20the%20GoldVIP%20package.%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20avoid%20mixing%20topics%2C%20please%20create%20a%20new%20post%20or%20a%20new%20support%20ticket%20for%20the%20bootloader%20topic%20if%20you%20need%20guidance%20from%20our%20side.%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E