MCU User Forum
  Can not perform In-system Debugging on product PCBA

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   Can not perform In-system Debugging on product PCBA
genching
New Member
posted September 02, 2010 03:10 AM     Click Here to See the Profile for genching   Click Here to Email genching     Edit/Delete Message
Here F411 is used on our product, and our products are called optical transceiver, which is used in optical fiber communications. The issue I meet is as the title. Debug will stop while setting XBR1. Does anyone know the reason?
BTW, the software is keil uv3.
As bellows:
void Port_IO_Init()
{
P2MDIN = 0xF8; //P2.0,P2.1,P2.2 Analog input
P2SKIP = 0x07;
P2 = 0xFF;
P1MDIN = 0xF7;//P1.3 Analog input
P1SKIP = 0x08;
P1MDOUT = 0xC0;
P0MDOUT = 0x00;
P0 = 0xFF;
P0SKIP = 0x83;
XBR0 = 0x04;
XBR1 = 0x40;
}

IP: Logged

Tsuneo
Member
posted September 02, 2010 05:38 AM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
I don't see any problem on this code.
The problem lies outside of this code.
Watchdog?

Tsuneo

IP: Logged

Tsuneo
Member
posted September 02, 2010 06:06 AM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
Ah, this possibility still remains.

On your code,


P1MDOUT = 0xC0; // set P1.7, P1.6 to push-pull
...
XBR1 = 0x40; // enable crossbar - output drivers on ports are enabled, too

If P1.7 or P1.6 accidentally short to GND, or if these ports conflict with output of other component,
short current may disturb VDD supply at "XBR1 = 0x40;" timing.
What do P1.7 / P1.6 connect to?

Tsuneo

IP: Logged

genching
New Member
posted September 02, 2010 07:57 PM     Click Here to See the Profile for genching   Click Here to Email genching     Edit/Delete Message
Hi Tsuneo,
Tks for your reply.
1.6 and 1.7 are used to driver digital risistor (pin DN and UP of Max5128ELA).
Attach the whole configuration:
void PCA_Init()
{
PCA0CN = 0x40;
PCA0MD &= ~0x40;
PCA0MD = 0x04; //TimeBase is Timer0 Overflow
PCA0CPL5 = 0x0E;
}

void Timer_Init()
{
TCON = 0x51; //INT0 is edge triggered ,Timer0/1 is enable
TMOD = 0x12;
CKCON = 0x02;
TL1 = 0x4F;
TH1 = 0x9C;
}

void SMBus_Init()
{
SMB0CF = 0x80;//enable SMBus
}

void ADC_Init()
{
ADC0MX = 0x0B;
ADC0CF = 0x18;//
ADC0CN = 0x80;
}

void DAC_Init()
{
IDA1CN = 0xF4;//0.25mA
IDA0CN = 0xF4;//0.25mA

}

void Voltage_Reference_Init()
{
REF0CN = 0x17;
}

void Port_IO_Init()
{
// P0.0 - SDA (SMBus), Open-Drain, Digital
// P0.1 - SCL (SMBus), Open-Drain, Digital
// P0.2 - Skipped, Open-Drain, Digital
// P0.3 - Skipped, Open-Drain, Digital
// P0.4 - Skipped, Open-Drain, Digital
// P0.5 - Skipped, Open-Drain, Digital
// P0.6 - Skipped, Open-Drain, Digital
// P0.7 - Skipped, Open-Drain, Digital

// P1.0 - Skipped, Open-Drain, Digital
// P1.1 - Skipped, Open-Drain, Analog
// P1.2 - Skipped, Open-Drain, Digital
// P1.3 - Skipped, Open-Drain, Analog
// P1.4 - Skipped, Open-Drain, Digital
// P1.5 - Skipped, Open-Drain, Digital
// P1.6 - Skipped, Open-Drain, Digital
// P1.7 - Skipped, Open-Drain, Digital

// P2.0 - Skipped, Open-Drain, Digital
// P2.1 - Skipped, Open-Drain, Digital
// P2.2 - Skipped, Open-Drain, Digital
// P2.3 - Skipped, Open-Drain, Digital
// P2.4 - Skipped, Open-Drain, Digital
// P2.5 - Skipped, Open-Drain, Digital
// P2.6 - Skipped, Open-Drain, Digital
// P2.7 - Skipped, Open-Drain, Digital

P2MDIN = 0xF8; //P2.0,P2.1,P2.2 Analog input
P2SKIP = 0x07;
P2 = 0xFF;
P1MDIN = 0xF7;//P1.3 Analog input
P1SKIP = 0x08;
P1MDOUT = 0xC0;
P0MDOUT = 0x00;
P0 = 0xFF;
P0SKIP = 0x83;
XBR1 = 0x40;
XBR0 = 0x04;

}

void Oscillator_Init()
{
int i = 0;
OSCICN = 0x87;
}

void Interrupts_Init()
{ IT01CF = 0x07; //INT0 PIN is P0.7
EIE1 = 0x01;//enable SMBus interrupt
EIP1 = 0x01;//SMBus interrupt high
IE = 0x01;//enable INT0 interrupt EA=0 ,disable Timer1 interrupt
IP = 0x00;//INT0 interrupt low

}

void Init_Device(void)
{
VDM0CN = 0x80; // enable VDD monitor
delay(10);
RSTSRC = 0x02;; // enable VDD monitor as a reset source
PCA_Init();
Timer_Init();
SMBus_Init();
ADC_Init();
DAC_Init();
Voltage_Reference_Init();
Port_IO_Init();
Oscillator_Init();
Interrupts_Init();
}

IP: Logged

genching
New Member
posted September 02, 2010 08:00 PM     Click Here to See the Profile for genching   Click Here to Email genching     Edit/Delete Message
And F411 can run in our products very well after loading the program, just cannot run in debug mode on the product.

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | MCU User Forum

Have you seen our MCU Knowledge Base?


Ultimate Bulletin Board 5.47b