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.

CCS/AM3358: Toggle GPIO output waveform

Part Number: AM3358


Tool/software: Code Composer Studio

I am using GPIO1_30 to get a Clock by toggling this GPIO.

The configuration:

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_GPMC_CSN(1)) = CONTROL_CONF_MUXMODE(7);

    // CLK as output
    GPIODirModeSet(SOC_GPIO_1_REGS, 30, GPIO_DIR_OUTPUT);

Then use the following lines to write *fileStream to a 8-bit port:

    for(i = 0; i < ulFileSize; i++)
    {
        for(j = 0; j < 8; j++)
        {
            c = (*(fileStream + i) >> (7 - j)) & 0x01;
            GPIOPinWrite(SOC_GPIO_1_REGS, j, c);
        }
        GPIOPinWrite(SOC_GPIO_1_REGS, 30, GPIO_PIN_LOW);
        for(k = 0; k < 500; k++);
        GPIOPinWrite(SOC_GPIO_1_REGS, 30, GPIO_PIN_HIGH);
        for(k = 0; k < 500; k++);

    }

When I probe the CLK with debugger running the codes, I get the output in the first picture.

When I probe the CLK with the A8 running codes from eMMC, I get the output in the second picture.

Whey there is triangle output ? Why different output shapes? I am so confused.

Thank you.