@@ -177,7 +177,11 @@ static char *safeitoa(const int x, char *buffer, const int bufferSize, const int
...
@@ -177,7 +177,11 @@ static char *safeitoa(const int x, char *buffer, const int bufferSize, const int
}
}
//#include <stm32f4xx_spi.h>
//#include <stm32f4xx_spi.h>
#if WAIT_FOR_FIX == 1
volatileuint64_tticks=0;
volatileuint64_tticks=0;
#else
volatileuint64_tticks=1505658926;
#endif
//must be called via GPIO-Interrupt
//must be called via GPIO-Interrupt
voidEXTI1_IRQHandler(void){
voidEXTI1_IRQHandler(void){
/* Make sure that interrupt flag is set */
/* Make sure that interrupt flag is set */
...
@@ -276,6 +280,10 @@ void SPI2_IRQHandler(void)
...
@@ -276,6 +280,10 @@ void SPI2_IRQHandler(void)
tm[i+1]='0';
tm[i+1]='0';
safeitoa(get_time(),&tm[1],20,16);
safeitoa(get_time(),&tm[1],20,16);
//MAGIC do not touch - you are not meant to understand the following line :D
// for(volatile uint16_t i=0; i < 12; ++i) asm volatile("nop"); //This line has it's puprose, due to racing conditions which caused damaged data, we artifically increased the delay of safeitoa.
// if safeitoa is too fast, the string of the RX-Board is not transmitted completely, thus not all characters are safed in the fifo causing that not all characters are transferred.