Tool/software: Code Composer Studio
Break at address XXXX with no debug information available, or outside of program code. what does this mean. at what point of code this happening?
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.
Tool/software: Code Composer Studio
Break at address XXXX with no debug information available, or outside of program code. what does this mean. at what point of code this happening?
Hi,
Add some advice to solve this problem.
First choice: Use break point to find the location of error code in debug mode.
Second choice: Run the code step by step in debug mode.
The aim is to find the location where the code jump to address XXXX.
Eason
the code is large, if the problem continues i'll attach the zip file. but whenever i call following function the problem occurs
#include "msp430.h"
#include "GPIO.h"
#include "Airpump.h"
#include "Membrane_LED.h"
//*******************************************************************************
// Airpump- Timer_B, PWM TB1-1, Up Mode, DCO SMCLK
//
// Description: This program generates four PWM outputs on P4.1 using
// Timer_B configured for up mode. The value in CCR0 2000 in PUMPPWM_CLK() function
// defines the PWM period as 2KHz and the values in CCR1 and CCR2 the PWM duty cycles. Using ~1.045MHz
// SMCLK as TBCLK, the timer period is ~2000us with a changing duty cycle with every button pressed on P4.1
// ACLK = n/a, SMCLK = MCLK = TBCLK = default DCO ~1.045MHz.
//
// MSP430F5359
// -------------------
// /|\| |
// | | |
// --|RST |
// | |
// | P4.1/TB4.1|--> CCR1 - 25% PWM, 50% PWM, 75% PWM, 100% PWM
// | |
//
// K. Adhikari
// Kemp Meek Manu.
//
// @param setting from airpump switch pressed by user is passed to Airpumpbuttonpressed
//
// @return none
//******************************************************************************
void Airpump(unsigned int Airpumpbuttonpressed)
{
switch (Airpumpbuttonpressed)
{
case 0: //AIRPUMP is OFF.
Ap_MEMBRANE_LED(0); //Turn off the LED indicator
TBCCR1 = 0; //CCR1 duty cycle zero
P4SEL &= ~BIT1; //Set P4.1 SEL for GPIO
break;
case 1: //AIRPUMP is at setting 1
Ap_MEMBRANE_LED(1); //Turn ON the Airpump LED indicator 1
P4SEL |= BIT1; //Set P4.1. SEL
TBCCR1 = 1000; //CCR1 duty cycle = 1000/2000
//The period in microseconds that the power is ON.
//It's translates to a 25% duty cycle.
//Although the duty cycle is not equal to 25%, we consider using this as the lowest speed and
//equivalent to 25% from our design test, similar applies for the upcoming cases 2 and 3.
break;
case 2: //AIRPUMP is at setting 2
Ap_MEMBRANE_LED(2); //Turn ON the Airpump LED indicator 2
P4SEL |= BIT1; //Set P4.1. SEL
TBCCR1 = 1333; //CCR1 duty cycle = 1333/2000
//The period in microseconds that the power is ON.
//It's translates to a 50% duty cycle.
break;
case 3: //AIRPUMP is at setting 3
Ap_MEMBRANE_LED(3); //Turn ON the Airpump LED indicator 3
P4SEL |= BIT1; //Set P4.1. SEL
TBCCR1 = 1777; //CCR1 duty cycle = 1777/2000
//The period in microseconds that the power is ON.
//It's translates to a 75% duty cycle.
break;
case 4: //AIRPUMP is at setting 4
Ap_MEMBRANE_LED(4); //Turn ON the Airpump LED indicator 4
P4SEL |= BIT1; //Set P4.1. SEL
TBCCR1 = 2000; //CCR1 duty cycle = 2000/2000
//The period in microseconds that the power is ON.
//It's translates to a 100% duty cycle.
break;
default:
break;
}
}
le.
void Init_FLL_Settle(uint16_t fsystem, uint16_t ratio)
{
volatile uint16_t x = ratio * 32;
Init_FLL(fsystem, ratio);
while (x--){
__delay_cycles(30);
}
}
void Init_FLL(uint16_t fsystem, uint16_t ratio)
{
uint16_t d, dco_div_bits;
uint16_t mode = 0;
// Save actual state of FLL loop control, then disable it. This is needed to
// prevent the FLL from acting as we are making fundamental modifications to
// the clock setup.
uint16_t srRegisterState = __get_SR_register() & SCG0;
d = ratio;
dco_div_bits = FLLD__2; // Have at least a divider of 2
if (fsystem > 16000){
d >>= 1;
mode = 1;
}
else {
fsystem <<= 1; // fsystem = fsystem * 2
}
while (d > 512){
dco_div_bits = dco_div_bits + FLLD0; // Set next higher div level
d >>= 1;
}
__bis_SR_register(SCG0); // Disable FLL
UCSCTL0 = 0x0000; // Set DCO to lowest Tap
UCSCTL2 &= ~(0x03FF); // Reset FN bits
UCSCTL2 = dco_div_bits | (d - 1);
if (fsystem <= 630) // fsystem < 0.63MHz
UCSCTL1 = DCORSEL_0;
else if (fsystem < 1250) // 0.63MHz < fsystem < 1.25MHz
UCSCTL1 = DCORSEL_1;
else if (fsystem < 2500) // 1.25MHz < fsystem < 2.5MHz
UCSCTL1 = DCORSEL_2;
else if (fsystem < 5000) // 2.5MHz < fsystem < 5MHz
UCSCTL1 = DCORSEL_3;
else if (fsystem < 10000) // 5MHz < fsystem < 10MHz
UCSCTL1 = DCORSEL_4;
else if (fsystem < 20000) // 10MHz < fsystem < 20MHz
UCSCTL1 = DCORSEL_5;
else if (fsystem < 40000) // 20MHz < fsystem < 40MHz
UCSCTL1 = DCORSEL_6;
else
UCSCTL1 = DCORSEL_7;
__bic_SR_register(SCG0); // Re-enable FLL
while (UCSCTL7 & DCOFFG) { // Check DCO fault flag
UCSCTL7 &= ~DCOFFG; // Clear DCO fault flag
// Clear the global fault flag. In case the DCO caused the global fault flag to get
// set this will clear the global error condition. If any error condition persists,
// global flag will get again.
SFRIFG1 &= ~OFIFG;
}
__bis_SR_register(srRegisterState); // Restore previous SCG0
if (mode == 1) { // fsystem > 16000
SELECT_MCLK_SMCLK(SELM__DCOCLK + SELS__DCOCLK); // Select DCOCLK
}
else {
SELECT_MCLK_SMCLK(SELM__DCOCLKDIV + SELS__DCOCLKDIV); // Select DCODIVCLK
}
}
When i did the single step there nothing wrong, the function was working as it should but when i stopped the code i found the problem. whenever i call "Init_FLL_Settle(16000, 488); " in the main function the problem occurs I don't know why.
#include "msp430.h"
#include "UserExperience_F54xxA.h"
#include "audio.h"
#include "ucs.h"
#include "pmm.h"
///--Calibration constants and user configuration values stored in INFOB Flash--
// On the MSP430F5359 this memory section is 128B long and ranges from 00197Fh to 001900h
# pragma DATA_SECTION(firstAudioByte, ".infoB");
# pragma DATA_ALIGN(firstAudioByte, 2);
unsigned long firstAudioByte;
# pragma DATA_SECTION(lastAudioByte, ".infoB");
# pragma DATA_ALIGN(lastAudioByte, 2);
unsigned long lastAudioByte;
unsigned int Sw;
void Airpump(unsigned int Airpumpbuttonpressed)
{
if (Airpumpbuttonpressed == 1)
{
P4SEL |= BIT1;
TBCCR1 = 1333; //The period in microseconds that the power is ON. It's half the time, which translates to a 25% duty cycle.
}
else if (Airpumpbuttonpressed == 2)
{
P4SEL |= BIT1;
TBCCR1 = 1555; //The period in microseconds that the power is ON. It's half the time, which translates to a 50% duty cycle.
}
else if (Airpumpbuttonpressed == 3)
{
P4SEL |= BIT1;
TBCCR1 = 1777; //The period in microseconds that the power is ON. It's half the time, which translates to a 75% duty cycle.
}
else if (Airpumpbuttonpressed == 4)
{
P4SEL |= BIT1;
TBCCR1 = 2000;
}
else
{ // TA0CCR1 = 0//The period in microseconds that the power is ON. It's half the time, which translates to a 100% duty cycle.
TBCCR1 = 0;
P4SEL &= ~BIT1;
P4OUT &= ~BIT1;
}
}
void PWMCLK(void)
{
TBCCR0 = 2000;
TBCCTL1 = OUTMOD_7 | CLLD_1; //AIRPUMP
TBCTL = TBSSEL_2 | MC_1; // ACLK, upmode, clear TBR
}
void ButtonsInterruptEnable(unsigned char buttonIntEnableMask)
{
P3OUT &= 0x00; // Shut down everything
P3DIR &= 0x00;
P3DIR &= ~buttonIntEnableMask; // Set button pin as an input pin
P3REN |= buttonIntEnableMask; // Enable pull up resistor for button to keep pin high until pressed
P3OUT |= buttonIntEnableMask; // Set pull up resistor on for button
P3IE |= buttonIntEnableMask; // Enable interrupts on port 3 for the button
P3IES |= ~buttonIntEnableMask; // Enable Interrupt to trigger on the falling edge (high (unpressed) to low (pressed) transition)
P3IFG &= ~buttonIntEnableMask; // Clear the interrupt flag for the button
}
void UserExperience(void)
{
//Initialize clock and peripherals
UCS_initFLLSettle(16000, 488);
PMM_setVCore(PMMCOREV_3);
PWMCLK();
ButtonsInterruptEnable(BIT4);
P4DIR=BIT1;
__enable_interrupt();
while (1) // main loop
{
Airpump(Sw);
}
}
#pragma vector=PORT3_VECTOR
__interrupt
void Port3_ISR(void)
{
switch (__even_in_range(P3IV, 0x10))
{
case 0x00: //None
break;
case 0x02: //Pin0
break;
case 0x04:
//BRI
case 0x06:
//Fix color
break;
case 0x08:
//Pin 3
break;
case 0x0A:
if (Sw < 4)
Sw++;
else
Sw = 0;
P3IFG = ~BIT4;
//pin4
break;
case 0x0C:
//pin5
break;
case 0x0E:
//pin6
break;
case 0x10:
//pin7
break;
}
//pin7
}
I need FLL for audio function. The audio is working fine but whenever i try to integrate airpump function, the code functions erratically. I just posted the small piece of code which i'm working for troubleshooting. userexperience function is called in main function. here is the attached code.
I figured that the crystal (absence) failover to REFOCLK would just happen if there's no crystal, but User Guide (SLAU208q) Sec 5.2 makes a distinction between dedicated XIN/XOUT pins (your case) and shared XIN/XOUT pins (the case I'm familiar with).
Try adding these lines some time before calling Init_FLL. This is a guess, but using REFOCLK for the FLL is what you want, so it won't hurt.
UCSCTL3 |= SELREF__REFOCLK; // Insist on REFOCLK, not XT1, for FLL. UCSCTL4 |= SELA__REFOCLK; // The same for ACLK, leaving no users of XT1.
**Attention** This is a public forum