Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 5781

Can not read pin

$
0
0

Hi,

I am using a S3A3 on a custom board and can not read the P214 pin correctly. I have verified that I get VCC on the pin when it is switched, and 0V when un-switched.

If I load the same binary file onto the target board it works as expected. I did have to change some of the solder bridge jumpers to allow the J2 p214 pin to be connected to the processor.

 

My simple example that fails to work is below. I added a pin read to the blinky example and then set the led based upon this.

 

void blinky_thread_entry(void)
{
    ioport_level_t priLevel;
    ioport_level_t previousLevel;

    while (1)
    {
        g_ioport.p_api->pinRead(IOPORT_PORT_02_PIN_14, &priLevel); // input pin

        g_ioport.p_api->pinWrite(IOPORT_PORT_04_PIN_08, priLevel); //my custom boards led
        g_ioport.p_api->pinWrite(IOPORT_PORT_01_PIN_06, priLevel);// target boards led

        /* Delay */
        tx_thread_sleep (50);
    }
}

 

 

Any Ideas why something so simple is not working?


Viewing all articles
Browse latest Browse all 5781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>