RT1050 Boundary Scan test based on lauterbach

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

RT1050 Boundary Scan test based on lauterbach

RT1050 Boundary Scan test based on lauterbach

RT1050 Boundary Scan test based on lauterbach

1. Abstract

Boundary Scan is a method of testing interconnections on circuit boards or internal sub-blocks of circuits. You can also debug and observe the pin status of the integrated circuit, measure the voltage or analyze the sub-modules inside the integrated circuit, and test based on the JTAG interface.

NXP officials have provided two good application notes: AN13507 (LPC) and AN12919 (RT). Based on the reference application note test method, this article provides the boundary scan test results for NXP MIMXRT1050-EVK revA1. It can use Lauterbach to connect the chip and perform boundary scan to control the external pins. A script file is also provided. It can realize one-click connection to boundary scan and achieve level control of external pins.

2. RT1050 test details

2.1 Hardware platform

Lauterbach:LA3050

MIMXRT1050-EVK rev A1 hardware modification point are as follows:

(1)Modify fuse bit 0X460[19], which is DAP_SJC_SWD_SEL, from 0-SWD to 1-JTAG.

To modify Fuse, you can enter serial download mode and use MCUbootUtility to connect and modify it.

1.jpg

Fig 1

(2)DNP R38 ,R323,R309,R152,R303

  (3)  JTAG_MODE connect to 3.3V= on board TP11 connect to J24_8

(4)R35 connect 100K resistor

(5)ONOFF pin pull up external 100K resistor to 3.3V,board modification point is SW2 pin3 or pin4 connect 100K resistor and pull up to J24_8.

   (6) disconnect J32,J33 which will disconnect the on board debugger, because this test need to use the external Lauterbach.

   (7) Use the external Lauterbach connect to JTAG interface J21, the connection picture is:

 

 2.jpg

Fig 2

2.2 Software operation

Download Lauderbach's supporting software and install it. After installation, open the TRACE32 ICD Arm USB. If the Lauderbach device is connected, the interface will open successfully.

3.jpg

Fig 3

At this time, you can enter the relevant commands in the yellow box in the picture above.

Here you need to prepare the .bsdl file of the chip, which is usually placed on the chip introduction page of nxp.com. For example, the link to the bsdl file of RT1050 is

https://www.nxp.com/downloads/en/bsdl/RT1050.bsdl

You can copy the RT1050.bsdl file to the Lauderbach installation path: C:\T32

Next, enter the following command in the window to open the boundary scan window

SYStem.Mode Down
BSDL.RESet
BSDL.ParkState Select-DR-Scan
BSDL.state

Here, it will open the window:

4.jpg

Fig 4

Click FILE item, input the downloaded RT1050.bsdl , then in the window input the commander:

BSDL.SOFTRESET

 

 5.jpg

Fig 5

Click check->BYPASSall,IDCODEall,SAMPLEall, make sure the 3 methods can be passed.

It is found here that the following problems are encountered when clicking IDCODEall:

 6.jpg

Fig 6

It prompts that the IDCODE read is 188c301d, but the expected IDCODE is 088c301d. So what is the correct IDCODE? You can view RT1050RM:

 7.jpg

Fig 7

It can be seen that the currently read 188c301d is in line with RM and is correct. Therefore, the version of bsdl downloaded from the official website needs to be modified. Open the RT1050.bsdl file:

 8.jpg

Fig 8

Modify line 408 version from 0000 to 0001,Fig 8 is the modified result. Save, run the above commands again, we can see the current BYPASSall,IDCODEall,SAMPLEall connection result is:

 9.jpg

Fig 9

10.jpg

Fig 10

11.jpg

Fig 11

To test the output control situation you need to do:

BSDLSET 1.: instructions->EXTEXT, DR mode->Set Write, Filter data-> uncheck intern

BSDL.state->Run: check SetAndRun, TwoStepDR,  Click RUN button.

BSDLSET 1. Window, you can control the pin output status, eg, control GPIO_AD_B1_06 which is J22_2, control the output level: 1 high, 0 low.

 12.jpg

Fig 12

2.3 Automation control command script

As can be seen from Section 2.2, single-step operation requires manual typing of commands. In actual testing, the efficiency is very low, so scripting language can be used to directly implement automated command control.

Below, we take RT1050 as an example to control the level of the onboard GPIO_AD_B1_06 and J22_2 pins, and use a multimeter to test the high and low levels. In this way, when the TRACE32 software is opened, you only need to open the script directly, enter the debug mode, run it to the end with one click, and view the board Just turn on the light and control the status.

Script language, suffix .cmm, step: File->New Script, enter the following script command:

;system setup
SYStem.Mode Down
SYStem.CPU CortexM7

SYSTEM.CONFIG.DEBUGPORTTYPE JTAG

SYStem.JtagClock 1MHz


;BSDL Settings
BSDL.RESet
BSDL.ParkState Select-DR-Scan
BSDL.state

;configure boundary scan chain
BSDL.FILE RT1050.bsdl
;Check boundary scan chain
BSDL.SOFTRESET

BSDL.BYPASSall
BSDL.IDCODEall
BSDL.SAMPLEall ;Perform Sample test

BSDL.RUN
BSDL.SetAndRun ON
BSDL.TwoStepDR ON

BSDL.SET 1.

BSDL.SET 1. IR EXTEST
BSDL.RUN

BSDL.SET 1. PORT GPIO_AD_B1_06 0

BSDL.SET 1. PORT GPIO_AD_B1_06 1

BSDL.SET 1. PORT GPIO_AD_B1_06 0
WAIT 6.s
BSDL.SET 1. PORT GPIO_AD_B1_06 1
WAIT 6.s

BSDL.SET 1. PORT GPIO_AD_B1_06 0
WAIT 2.s
BSDL.SET 1. PORT GPIO_AD_B1_06 1
WAIT 2.s

BSDL.SET 1. PORT GPIO_AD_B1_06 0
WAIT 2.s
BSDL.SET 1. PORT GPIO_AD_B1_06 1
WAIT 2.s

BSDL.SET 1. PORT GPIO_AD_B1_06 0
WAIT 2.s
BSDL.SET 1. PORT GPIO_AD_B1_06 1
WAIT 2.s

BSDL.SET 1. PORT GPIO_AD_B1_06 0
WAIT 2.s
BSDL.SET 1. PORT GPIO_AD_B1_06 1
WAIT 2.s

Function: Pull the GPIO_AD_B1_06 pin high and low 6 times, with no delay, delay 5s, delay 2s. After the script is written, save it and debug it.

 13.jpg

Fig 13

This is the video for the testing:

It can be seen that automatic control of the onboard GPIO_AD_B1_06 and J22_2 pins can be achieved, and there is no disconnection issue when the test delay is greater than 5S, indicating that the BSDL automatic test has been completed so far. If you encounter problems, be sure to pay attention to whether the hardware modification points of the board have been completely modified.

 

At last, thanks so much for my colleague @leilei_du  and @albert_li 's endless help!

 

 

Labels (1)
Attachments
Comments

@kerryzhou 

Excellent job!

No ratings
Version history
Last update:
‎12-13-2023 02:44 AM
Updated by: