Keresés ebben a blogban

2015. június 8., hétfő

SSD1289, ADS7843, ChibiOS_2.6.8, uGFX 2.3, gnu-arm4_9-2015-q1

Here is a picture of the saleae hooked up to SPI with the old ugfx+chibios:
Lot of samples.

And here is the new one with the new OS and ugfx:
Not as many samples as before...
I guess it is an SPI/OS issue. The IRQ pin is OK as I see...
The board file has:

static bool_t init_board(GMouse* m, unsigned driverinstance) {
    (void)        m;

    if (driverinstance)
        return FALSE;

    palSetPadMode(GPIOB, 13, PAL_MODE_ALTERNATE(5) );    /* SCK */
    palSetPadMode(GPIOB, 14, PAL_MODE_ALTERNATE(5) );    /* MISO */
    palSetPadMode(GPIOB, 15, PAL_MODE_ALTERNATE(5) );    /* MOSI */
    palSetPadMode(GPIOC,  4, PAL_MODE_OUTPUT_PUSHPULL);    /* CS */
    palSetPadMode(GPIOC,  5, PAL_MODE_INPUT_PULLDOWN); /* IRQ */

    spiStart(&SPID2, &spicfg);
    return TRUE;
}


static inline bool_t getpin_pressed(GMouse* m) {
    (void)        m;

    return (!palReadPad(GPIOC, 5));
}


And here is a video: (sorry for the quality)
The yellow LED in the background shows that the board is alive, it is a thread. As you can see it randomly reads and sometimes senses. I have hooked up an LED for the getpin_pressed as you said. It flashes when it becomes TRUE so I think that part is OK. I've checked the IRQ pin as you mentioned and set it to input pulldown so it is not floating.

Nincsenek megjegyzések: