Jump to content

Kb1gtt

Members
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. With some help from a friend, I got it working at least from a hard coded standpoint. Using the example on the wiki we got it to display the existing calibrated values, which I then used to replace the numbers noted in the example on the wiki. This has also caused the stack overflow to go away. Next thing to learn is how to make this persistant, such that I can remove the hard coding. I understand there is a lib or similar that I'll need to add to make this easier to do. Also to get the values to hard code, I used the below snippet, then I added to the variables in the Expressions in chibistudio, and copied and pasted the values to the section of the example code. So far so good. bool_t SaveMouseCalibration(unsigned instance, const void *data, size_t sz) { (void)instance; if (sz != sizeof(calibrationData) || instance != 0) { return FALSE; } memcpy((void*)&calibrationData, data, sz); return TRUE; }
  2. I'm trying to get the touch screen to only calibrate when it's required. Is there an example that shows how to do the screen calibration? I'm sure I'm not the first one to do this, however I have not been able to find an existing reference example yet. Here is where I'm at and what I've attempted so far. I found this wiki page http://wiki.ugfx.org/index.php/Touchscreen_Calibration however I'm still lost. When I try to enable load and save like this in gfxconf.h #define GINPUT_TOUCH_USER_CALIBRATION_SAVE TRUE #define GINPUT_TOUCH_USER_CALIBRATION_LOAD TRUE I get this error which are sourced from ginput_mouse.c undefined reference to `LoadMouseCalibration' undefined reference to `SaveMouseCalibration' Also I have an LCD button that will call ginputCalibrateMouse(0); When I press this button, the screen goes blank blue, my heartbeat LED stops blinking, and when I use the debugger pause I see dbg_panic_msg is a stack overflow. I'm not sure how to fix these issues. they are a bit beyond my programming abilities. One person suggested the program might not have enough memory for the stack. I see my make file notes CHIBIOS_LDSCRIPT = STM32F429xI.ld which contains this. MEMORY { flash : org = 0x08000000, len = 2M ram0 : org = 0x20000000, len = 192k /* SRAM1 + SRAM2 + SRAM3 */ ram1 : org = 0x20000000, len = 112k /* SRAM1 */ ram2 : org = 0x2001C000, len = 16k /* SRAM2 */ ram3 : org = 0x20020000, len = 64k /* SRAM3 */ ram4 : org = 0x10000000, len = 64k /* CCM SRAM */ ram5 : org = 0x40024000, len = 4k /* BCKP SRAM */ ram6 : org = 0x00000000, len = 0 ram7 : org = 0x00000000, len = 0 } /* RAM region to be used for Main stack. This stack accommodates the processing of all exceptions and interrupts*/ REGION_ALIAS("MAIN_STACK_RAM", ram0); /* RAM region to be used for the process stack. This is the stack used by the main() function.*/ REGION_ALIAS("PROCESS_STACK_RAM", ram0); /* RAM region to be used for data segment.*/ REGION_ALIAS("DATA_RAM", ram0); Perhaps I should change those ram#'s to something more, but I don't know what they should be changed too. Here's some back ground information about my setup. I'm using an STM32F429 discovery, and I started with this demo I have made reasonably small changes. I added some buttons on the LCD which when pressed will increase and decrease the rate of blinking of the green LED. I also added some debug stuff like setting up the terminal1, and chibios debug options. I have put a copy of my project posted here https://sourceforge.net/p/daecu/code/HEAD/tree/Hardware/trunk/rusefi.com/Digital_Dash_STM32F429/A_stm32f429_discovery_chibios_3/ I'm using chibistudio for the IDE on a win64 platform. Are there any suggestions in what I could look at to help get this screen to only calibrate when needed instead of on every boot?
×
×
  • Create New...