This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335X UART boot : Unable to send u-boot.img

Other Parts Discussed in Thread: AM3352, AM3358, TPS65217

Hello,

I'm working on AM335s custom board and trying to boot using UART. My board has
    * AM3352 processor
    * TPS65217C PMIC
    * IS43TR16128A-125KBLI DDR3

serial console used - Minicom

Referred below link to send send file over UART.

http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User%27s_Guide#Boot_Over_UART

  • spl/u-boot-spl.bin file is successfully sent using Xmodem.
  • Unable to send u-boot-spl.bin file using Ymodem. File trasfer is failed with error message "spl: ymodem err - Cancelled" and minicom says 

+-----------[ymodem upload - Press CTRL-C to quit]------------+                                  
|Retry 0: Got 78 for sector ACK                               |                                  
|Retry 0: NAK on sector                                       |                                  
|Retry 0: Retry Count Exceeded                                |                                  
|                                                             |                                  
|Transfer incomplete                                          |                                  
|                                                             |                                  
| READY: press any key to continue...                         |                                  
+-------------------------------------------------------------+

uboot-uart.txt
CCCC3.10 (Oct 08 2015 - 15:04:41)                                                                                         
### Use AM335x_SK V1.2 setting ###                                                                                          
Reading eeprom_return0.                                                                                                               
5                                                                                                                                     
### Use AM335x_SK V1.2 setting ###                                                                                                    
Reading eeprom_return0.                                                                                                               
inside board_is_evm_sk                                                                                                                
Entering sdram_init### Use AM335x_SK V1.2 setting ###                                                                                 
Reading eeprom_return0.                                                                                                               
6                                                                                                                                     
ddr1                                                                                                                                  
ddr2                                                                                                                                  
ddr3                                                                                                                                  
ddr4                                                                                                                                  
ddr3                                                                                                                                  
ddr_inline                                                                                                                            
ddr6                                                                                                                                  
ddr7                                                                                                                                  
ddr8                                                                                                                                  
ddr9                                                                                                                                  
16                                                                                                                                    
7                                                                                                                                     
18                                                                                                                                    
mem malloc                                                                                                                            
timer init                                                                                                                            
21                                                                                                                                    
23                                                                                                                                    
27                                                                                                                                    
28                                                                                                                                    
30                                                                                                                                    
31                                                                                                                                    
33                                                                                                                                    
34                                                                                                                                    
36                                                                                                                                    
37                                                                                                                                    
38                                                                                                                                    
39                                                                                                                                    
24                                                                                                                                    
25                                                                                                                                    
config usb0                                                                                                                           
config usb1                                                                                                                           
26                                                                                                                                    
20                                                                                                                                    
### Use AM335x_SK V1.2 setting ###                                                                                                    
Reading eeprom_return0.                                                                                                               
freq2                                                                                                                                 
freq3                                                                                                                                 
freq4                                                                                                                                 
freq9                                                                                                                                 
i2cgot11                                                                                                  
pmic1                                                                                                     
pmic2                                                                                                     
pmic3                                                                                                     
pmic4                                                                                                     
clock1                                                                                                    
pmic1                                                                                                     
pmic2                                                                                                     
pmic3                                                                                                     
pmic4                                                                                                     
clock1                                                                                                    
22                                                                                                        
spl.0                                                                                                     
spl.1.1                                                                                                   
boot device is 65                                                                                         
spl.7                                                                                                     
Entered spl_ymodem_load_image                                                                             
Cbefore while                                                                                             
xyzModem_get_hdr func                                                                                     
xyz.tx_ack = [0]
xyz.__chan = [1073805700]    
| c = [18]
else -- CAN
while hdr_found
res = [1] || c = [18]
else -- CAN
while hdr_found
res = [1] || c = [18]
xyzModem_cancel -- if
stst = [-5]
spl: ymodem err - Cancelled
### ERROR ### Please RESET the board ###

Boot sequence used is SYSBOOT[4:0] is 10111b.

I'm not sure DDR configuration is proper or not. PFB DDR timing configuration.

Memory datasheet symbol Memory Datasheet value
tCK 3.3
tRP 13.125
tRCD 13.125
tWR 15
tRAS 35
tRC 48.125
tRRD 4
tWTR 4
tXP 3
ODTLon 3
tXS 170
tXSDLL 512
tRTP 4
tCKE 3
tZQCS 64
tRFC 160
tREFI
tRASmax

Please help me in resolving the issue.

Thanks and regards,

Lahari P.

  • Hello Biser,

    Thanks for your reply.

    I don't have JTAG Emulator. Is there any other way to check DDR configuration? But I can read and write to DDR3.

    Boot over UART is not progressing as I'm not able to send u-boot.img using Ymodem. Is this because of improper DDR configuration? or any other reason ?

    Please suggest me way forward.

    Thanks and regards,

    Lahari P.

  • Hello Lahari,

    Which SDK do you use? Have you setup the ymodem in 1K mode?

    Best regards,
    Kemal

  • Hi Kemal,

    I'm using ti-sdk-am335x-evm-07.00.00.00.

    Yes I tried with "sx -kb --ymodem" as well as "sb -kb" , "sb -vv" in minicom.

    Regards,

    Lahari P.

  • This issue has seen in some boards only with the SDK 7. Could you try with the images from another version of SDK.
  • Kemal,

    Earlier I was booting with SD card but booting din't happen. so i'm trying boot over UART.

    PFB link for issue of SD card boot.

    https://e2e.ti.com/support/arm/sitara_arm/f/791/t/448725

    I tried booting with U-boot V2014 with same SDK 7.0. Xmodem transfer happens, but it's not completing successfully

    If I add puts statement in board_init_r it strucks and it won't display properly. i'm not finding why and where it's getting struck.

    SPL_BUILD

    calling prcm_init func

    ### Use AM335x_SK V1.2 setting ###

    Reading eeprom_return0.

    calling set_mux_conf_regs func

    ### Use AM335x_SK V1.2 setting ###

    Reading eeprom_return0.

    inside board_is_evm_sk

    returning from board_early_init_f

    ### Use AM335x_SK V1.2 setting ###

    Reading eeprom_return0.

    returning from s_init

    >>sai_rm

     

    Please help in going ahead.

    Thanks and regards,

    Lahari

  • Based on your two threads I cannot see U-boot loading either way. I am asking again have you verified that your DDR is operating properly? How did you do this without JTAG? U-boot is loaded into DDR. If DDR is not operating correctly you will not be able to load U-boot or kernel.
  • Apologies Biser, I used only RatioSeed and DDR3 Timing congiguration tool, and used those values found. As I was able to read and write values i was in assumption that DDR configuration is proper.

    As per your suggestion we will buy a JTAG and try with proper configuration. Could you please let me know if XDS100v2 JTAG is compatible with AM3352 ?


    Thanks and regards,
    Lahari P.

  • Yes, absolutely.
  • Hello Biser,
    We are using Blackhawk XDS100v2 ARM JTAG, AM3358_StarterKit Gel file and CCS version 6.0.1.  
    I'm not able to connect the board. I'm getting "error connecting to the target" error-2131.

    Error connecting to the target:
     
    (Error -2131 @ 0x0)
    Unable to access device register. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK).
    (Emulation package 5.1.507.0)
     

    Jtag test connection is also failing,
     
    -----[Perform the Integrity scan-test on the JTAG DR]------------------------
     
    This test will use blocks of 512 32-bit words.
    This test will be applied just once.
     
    Do a test using 0xFFFFFFFF.
    Scan tests: 1, skipped: 0, failed: 0
    Do a test using 0x00000000.
    Test 2 Word 0: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 1: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 2: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 3: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 4: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 5: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 6: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 7: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    The details of the first 8 errors have been provided.
    The utility will now report only the count of failed tests.
    Scan tests: 2, skipped: 0, failed: 1
    Do a test using 0xFE03E0E2.
    Scan tests: 3, skipped: 0, failed: 2
    Do a test using 0x01FC1F1D.
    Scan tests: 4, skipped: 0, failed: 3
    Do a test using 0x5533CCAA.
    Scan tests: 5, skipped: 0, failed: 4
    Do a test using 0xAACC3355.
    Scan tests: 6, skipped: 0, failed: 5
    Some of the values were corrupted - 83.3 percent.
     
    The JTAG DR Integrity scan-test has failed.
     
     
    Kindly help me to proceed further.

    Thanks and regards,
    Lahari P.

  • Can you post the JTAG part of your schematic?
  • Hello Biser,

    PFB Snapshot of the JTAG schematics.

    Thanks and regards,
    Lahari P.

  • Check R20. If it's really 0Ohm the JTAG won't function. Change it to 10kOhm.
  • Thanks for the quick reply Biser.
    I tried connecting 10Kohm to R20. But still I'm facing same error.

    Please let me know if am missing something.

    Kindest regards,

    Lahari P.

  • This doesn't sound good. The XDS100 buffer that drives TRST may have burned. What you can do is check whether the TRST line toggles when you attempt to connect. The other thing is to try with another XDS100, if you have one.
  • Wait a second: You posted that you have a Blackhawk XDS100v2 ARM JTAG, right? Do you have the CTI-14 adapter for it? ARM JTAG connector arrangement is different from the CTI-14 that you have on board. See this wiki for differences: http://processors.wiki.ti.com/index.php/JTAG_Connectors#Pinout

  • Biser,

    TRST line is toggling when we do "test connection". Yes we are using Blackhawk XDS100v2 ARM JTAG.

    We are referring the same link "ARM 20-Pin" column and connected VTref, nTRST,TDI,TDO,TMS,TCK and GND lines.

    Thanks and regards,
    Lahari P.

  • So does it connect now?
  • No.. same error Biser.

    Thanks and Regards,
    Lahari P.
  • No.. Same error Biser.
    Please advise.

    Thanks and regards,
    Lahari P.
  • If your XDS100 has an ARM-20 pinout, this is the adapter to CTI-20 (you can safely ignore pins 15-20 on the CTI-20 side):

    ARM-20_cTI-20_schematic.pdf


    You can also see this wiki for debugging connection problems: http://processors.wiki.ti.com/index.php/Debugging_JTAG_Connectivity_Problems

  • Hello Biser,

    Thanks for the schematic. With schematic and admin rights to computer helped me in resolving the problem.DDR3 is configured properly and I'm able to load u-boot.img.

    Now Boot loader is failing in Kernel.

    1. Is there any particular kernel changes for DDR3?

    2. To support TPS65217 we have done changes in "voltage and current regulator support" and "MFD" using menuconfig.

    2656.screenshots.docx

    Is this enough or any other changes to be done. Please suggest.

    Error:

    [    1.244556] ThumbEE CPU extension supported.
    [    1.253374] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    1.260157] edma-dma-engine edma-dma-engine.0: allocated channel for 0:25
    [    1.267401] edma-dma-engine edma-dma-engine.0: allocated channel for 0:24
    [    1.274644] omap_hsmmc 48060000.mmc: unable to get vmmc regulator -517
    [    1.281559] edma-dma-engine edma-dma-engine.0: freeing channel for 24
    [    1.288382] edma-dma-engine edma-dma-engine.0: freeing channel for 25
    [    1.298431] omap_hwmod: gpio1: _wait_target_disable failed
    [    1.304314] platform 48060000.mmc: Driver omap_hsmmc requests probe deferral
    [    1.311905] cpu cpu0: cpu0 regulator not ready, retry
    [    1.317293] platform cpufreq-cpu0.0: Driver cpufreq-cpu0 requests probe deferral
    [    1.326354] input: gpio_buttons.7 as /devices/gpio_buttons.7/input/input1
    [    1.334818] edma-dma-engine edma-dma-engine.0: allocated channel for 0:25
    [    1.342001] edma-dma-engine edma-dma-engine.0: allocated channel for 0:24
    [    1.349631] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:01 UTC (946684801)
    [    1.361831] omap_hsmmc 48060000.mmc: omap_device_late_idle: enabled but no driver.  Idling
    [    1.370953] omap_hsmmc 48060000.mmc: unable to get vmmc regulator -517
    [    1.377914] edma-dma-engine edma-dma-engine.0: freeing channel for 24
    [    1.385155] edma-dma-engine edma-dma-engine.0: freeing channel for 25
    [    1.391974] Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa06012c
    [    1.400057] Internal error: : 1028 [#1] ARM
    [    1.404468] Modules linked in:
    [    1.407702] CPU: 0 PID: 9 Comm: kworker/u2:1 Not tainted 3.12.10-ti2013.12.01 #13
    [    1.415617] Workqueue: deferwq deferred_probe_work_func
    [    1.421131] task: cd07c040 ti: cd0b4000 task.ti: cd0b4000
    [    1.426831] PC is at omap_hsmmc_runtime_suspend+0x14/0x50
    [    1.432525] LR is at omap_hsmmc_runtime_suspend+0x10/0x50
    [    1.438220] pc : [<c03536b0>]    lr : [<c03536ac>]    psr: a0000113
    [    1.438220] sp : cd0b5ce0  ip : cd0b5ce0  fp : cd0b5cec
    [    1.450326] r10: cd0c2610  r9 : c06295c0  r8 : c06295c0
    [    1.455835] r7 : 00000000  r6 : 00000000  r5 : cd0c2610  r4 : cd0c2610
    [    1.462717] r3 : fa060100  r2 : c002e3c0  r1 : cd0c2610  r0 : cd23ee80
    [    1.469602] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
    [    1.477310] Control: 10c5387d  Table: 80004019  DAC: 00000017
    [    1.483368] Process kworker/u2:1 (pid: 9, stack limit = 0xcd0b4240)
    [    1.489976] Stack: (0xcd0b5ce0 to 0xcd0b6000)
    [    1.494578] 5ce0: cd0b5cfc cd0b5cf0 c0283920 c03536a8 cd0b5d14 cd0b5d00 c002e3d4 c02838f8
    [    1.503207] 5d00: cd0c2610 00000004 cd0b5d34 cd0b5d18 c02875c0 c002e3cc c05f0ff4 00000000
    [    1.511836] 5d20: 00000004 00000000 cd0b5d84 cd0b5d38 c0287a48 c0287528 cd0b4000 00000000
    [    1.520464] 5d40: cd0c2610 00000004 cd0c2610 cd23ee80 fffffdfb fffffdfb cd0b5d84 00000000
    [    1.529093] 5d60: cd0c2610 00000004 cd0c2610 cd23ee80 fffffdfb fffffdfb cd0b5da4 cd0b5d88

    PFA log for more details. Please help in going ahead.

    kernal log.txt

    Thanks and regards,
    Lahari P.

  • No, This is not a DDR issue. DDR is configured only in SPL stage of U-boot. This seems like a kernel configuration issue. I will ask the Linux team to check this.
  • Hi,

    I suspect this is caused by incorrect settings of the PMIC, focus on the following (persistent) kernel messages:
    [ 1.274644] omap_hsmmc 48060000.mmc: unable to get vmmc regulator -517
    [ 1.304314] platform 48060000.mmc: Driver omap_hsmmc requests probe deferral
    [ 1.311905] cpu cpu0: cpu0 regulator not ready, retry
    [ 1.317293] platform cpufreq-cpu0.0: Driver cpufreq-cpu0 requests probe deferral

    These are caused by incorrect i2c0 settings:
    [ 0.210859] omap_i2c 44e0b000.i2c: could not find pctldev for node /pinmux@44e10800/pinmux_i2c0_pins, deferring probe
    [ 0.210891] platform 44e0b000.i2c: Driver omap_i2c requests probe deferral

    Focus on correcting i2c0 & pmic configuration in dts.

    Best Regards,
    Yordan
  • Thanks Yordan. Your inputs helped me in going further.