LPC4337 only dtected in JTAG chaing when P2_7 is low

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

LPC4337 only dtected in JTAG chaing when P2_7 is low

1,257 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ali_asadzadeh on Thu May 05 01:51:28 MST 2016
Hi
I have designed my custom board. the JLINK would only detect the cores if I only make p2_7 low, what's going on wrong? do you have any idea why it can not detect the cores when the p2_7 is high?

Labels (1)
0 Kudos
Reply
6 Replies

1,206 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos
Reply

1,206 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rodri on Thu May 05 11:07:19 MST 2016
Hi,


Quote:
the crystal is 12MHz and I have confirmed it's frequncy on the scope to be 12MHz,

.

Sorry I meant MCU Fclk. If you have access to P1_19, P6_0 or P3_0 on your board you can map it out and measure it.
0 Kudos
Reply

1,206 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ali_asadzadeh on Thu May 05 07:19:22 MST 2016

Quote:
Check if "int" has enough bits (is big enough) to count to 10.000.000.

it has,they are 32bits

Quote:
Check if SCU_PinConfigure is correct, or needs more parameters.

it's correct too

Quote:
Check if GPIO Port and Bit Nr is suitable for Port and Bit Nr

it's ok too


Quote:
Is the memory map correct for LPC4337? It is for flash bank A (0x1A000000) and you flash it to bank A,
and also with "Activate flash bank" in flash magic?



I think they are correct too,see for your self
https://i.imgsafe.org/c8792d4.jpg
0 Kudos
Reply

1,206 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mysepp on Thu May 05 06:37:15 MST 2016
Have a look at blinky on page 56 of
http://www2.keil.com/docs/default-source/default-document-library/mdk5-getting-started.pdf

Check if "int" has enough bits (is big enough) to count to 10.000.000.
Check if SCU_PinConfigure is correct, or needs more parameters.
Check if GPIO Port and Bit Nr is suitable for Port and Bit Nr (user manual).

Is the memory map correct for LPC4337? It is for flash bank A (0x1A000000) and you flash it to bank A,
and also with "Activate flash bank" in flash magic?
0 Kudos
Reply

1,206 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ali_asadzadeh on Thu May 05 04:56:30 MST 2016
Thanks the problem is that the J-link can not detect the cores, so I can not debuge the cores, the crystal is 12MHz and I have confirmed it's frequncy on the scope to be 12MHz,

I can flash magic the chip, here is a simple blinky program to flash a led that's connected to the P6_5 of MCU, but when I flash it on the MCU using flash magic it would not do anything!!!



Quote:

#include "LPC43xx.h"                    // Device header
#include "cmsis_os.h"                   // ARM::CMSIS:RTOS:Keil RTX
#include "GPIO_LPC43xx.h"               // Keil::Device:GPIO
#include "SCU_LPC43xx.h"                // Keil::Device:SCU



int main()
{
static int  i=0;
SystemInit();
GPIO_PortClock(0);
  //Turn on LED0
SCU_PinConfigure(6,5,SCU_CFG_MODE_FUNC0);
  GPIO_SetDir(3,4, GPIO_DIR_OUTPUT);

 
while(1)
{
GPIO_PinWrite(3,4, 0);
for(i=0;i<10000000;i++);
GPIO_PinWrite(3,4, 1);
for(i=0;i<10000000;i++);
i++;

}
}

0 Kudos
Reply

1,206 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rodri on Thu May 05 04:26:58 MST 2016
Hi,

From User manual: " If this pin is pulled LOW at reset, the part enters ISP mode using USART0." maybe your MCU is using a non-compatible CLK, when ISP mode is activated MCU takes a predefined CLK, that makes that JLINK works correctly.

Try to measure the CLK with a scope and compare it to ISP's CLK.

Also you can try to use vectorcatch option when debuging, or/and ISP reset script.

hope it can help you,

regards
0 Kudos
Reply