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.

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

Eclipse Linux STM32

Eclipse Kepler: https://www.eclipse.org/downloads/packages/release/Kepler/SR2
untar: $ tar -zxvf .tar.gz

GCC Embedded: https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q1-update/+download/gcc-arm-none-eabi-4_9-2015q1-20150306-linux.tar.bz2
untar: $ tar -xvjf .tar.bz2

OpenOCD:
Terminal: $sudo apt-get install openocd

Make tools:
Terminal: $sudo apt-get install build-essential checkinstall

$sudo apt-get install default-jre
$sudo apt-get install default-jdk

Run Eclipse
Add install software:
http://gnuarmeclipse.sourceforge.net/updates
GNU ARM...
Install
Restart

http://www.chibios.org/dokuwiki/doku.php?id=chibios:guides:stlink_eclipse

http://kfrancois.com/2014/11/28/stm32f4-ide-using-eclipse-openocd-and-gcc-linux/