AnsweredAssumed Answered

DSP56800E Quick Start error

Question asked by Robert Gehring on Feb 14, 2008
Latest reply on Feb 14, 2008 by Robert Gehring
Hello,

I am trying to combine two of the demo programs for the 56F8013 in the Quick Start sample applications.  Specifically the SCI and ADC demo.  I updated the appconfig.h from the SCI example with the ADC information. 
With the code below when I compile it with CW8, I keep getting a error that states:

"Link Error   :  Undefined : "Frx_char_hook"  Referenced from "FSci0RxFullISR" in scibf.c"
"Link Failed."
I looked through scibf.c and rx_char_hook is in there, not really sure why it is giving the error or what it means.  It may be because I don't have the correct files or values somewhere.  But if I start from either the SCI as a base or the ADC as a base project, they both get the same error(with exactly the same appconfig.h's).

Thanks for the help!


CODE:
#include "qs.h"
#include "sys.h"
#include "cop.h"
#include "adc.h"
#include "intc.h"
#include "gpio.h"
#include "occs.h"
#include "sci.h"
#include "../board.h"

char buff[] = "Sending ADC Values Test 1";


#define FALSE 0
#define TRUE  1
int BTN_PRS = FALSE;
adc_tBuff adc_Buff;

char adc_chr_buff[];

void main(void)
{
    volatile UWord16 w1, w0, w2, w3, w4, w5, w6, w7;
    UWord16 i;
    ioctl(COP, COP_INIT, NULL);
    ioctl(SYS, SYS_INIT, NULL);
   
    ioctl(GPIO_LEDS, GPIO_SETAS_GPIO, LED_R | LED_Y | LED_G | LED_R2 | LED_Y2 | LED_G2);
    ioctl(GPIO_LEDS, GPIO_SETAS_OUTPUT, LED_R | LED_Y | LED_G | LED_R2 | LED_Y2 | LED_G2);
    ioctl(GPIO_LEDS, GPIO_TOGGLE_PIN, LED_R | LED_Y | LED_G);
    ioctl(GPIO_LEDS, GPIO_SETAS_GPIO, BTN_0 | BTN_1);
    ioctl(GPIO_LEDS, GPIO_SETAS_INPUT, BTN_0 | BTN_1);
    ioctl(GPIO_LEDS, GPIO_PULLUP_ENABLE, BTN_0 | BTN_1);
    ioctl(GPIO_LEDS, GPIO_INT_ENABLE, BTN_0 | BIT_1);
   
    ioctl(ADC, ADC_INIT, NULL);
   
    ioctl(SCI_0, SCI_INIT, NULL);
    ioctl(SCI_0, SCI_SET_BAUDRATE, SCI_BAUD_9600);
    ioctl(SCI_0, SCI_TRANSMITTER, SCI_ENABLE);
    ioctl(SCI_0, SCI_RECEIVER, SCI_ENABLE);
    ioctl(SCI_0, SCI_BUFFERED_RX, SCI_ENABLE);
    ioctl(SCI_0, SCI_BUFFERED_TX, SCI_ENABLE);
 
    ioctl(INTC, INTC_INIT, NULL);
    archEnableInt();
   
//    write(SCI_0, BUFFERED, buff, sizeof(buff)-1);

    while(1)
    {
        for(i=0; i<50; i++)
              archDelay(0xffff);
          ioctl(GPIO_LEDS, GPIO_TOGGLE_PIN, LED_G2);
          ioctl(COP, COP_CLEAR_COUNTER, NULL);
        if(BTN_PRS == TRUE)
        {
            while(ioctl(ADC, ADC_GET_POWER_STATUS, ADC_CONVERTER_0 | ADC_CONVERTER_0 | ADC_VOLTAGE_REF)) { /* insert the checking of the other events if needed */ }
            ioctl(ADC, ADC_START, NULL);
               ioctl(GPIO_LEDS, GPIO_TOGGLE_PIN, LED_R);
            while (ioctl(ADC, ADC_GET_STATUS_CIP, NULL)) { /* insert the checking of the other events if needed */ }
            w0 = ioctl( ADC, ADC_READ_SAMPLE, 0);
            w1 = ioctl( ADC, ADC_READ_SAMPLE, 1);
            w2 = ioctl( ADC, ADC_READ_SAMPLE, 2);
            w3 = ioctl( ADC, ADC_READ_SAMPLE, 3);
            w4 = ioctl( ADC, ADC_READ_SAMPLE, 4);
            w5 = ioctl( ADC, ADC_READ_SAMPLE, 5);
            w6 = ioctl( ADC, ADC_READ_SAMPLE, 6);
            w7 = ioctl( ADC, ADC_READ_SAMPLE, 7);
            ioctl(ADC, ADC_READ_ALL_SAMPLES, adc_Buff);
            write(SCI_0, BUFFERED, buff, sizeof(buff)-1);
            BTN_PRS = FALSE;
        }
    }
}

#pragma interrupt on
void GPIO_ISR(void)
{

    UWord16 irqs = ioctl(GPIO_BTNS, GPIO_READ_INT_PENDING_REG, NULL);
    if(irqs & BTN_0)
    {
        ioctl(GPIO_LEDS, GPIO_TOGGLE_PIN, LED_R);
        BTN_PRS = TRUE;
        }
    if(irqs & BTN_1)
        ioctl(GPIO_LEDS, GPIO_TOGGLE_PIN, LED_R2);
    ioctl(GPIO_BTNS, GPIO_CLEAR_INT_PENDING, irqs);
}

#pragma interrupt off

Outcomes