Subversion Repositories NaviCtrl

Compare Revisions

Ignore whitespace Rev 899 → Rev 900

/trunk/main.c
508,6 → 508,10
ErrorCode = 0;
}
}
#ifdef DATAPLOTTER
newErrorCode = 0;
ErrorCode = 0;
#endif
 
if(newErrorCode)
{
803,19 → 807,19
// static File_t* f = NULL;
 
 
/* Configure the system clocks */
// Configure the system clocks
SCU_Config();
/* init VIC (Vectored Interrupt Controller) */
// init VIC (Vectored Interrupt Controller)
SCU_AHBPeriphClockConfig(__VIC,ENABLE); // enable AHB bus clock for VIC
SCU_AHBPeriphReset(__VIC, DISABLE); // disable reset state for VIC
VIC_DeInit(); // deinitializes the VIC module registers to their default reset values.
VIC_InitDefaultVectors();
 
Led_Init();
// initialize the debug UART1
LED_GRN_ON;
// initialize timer 1 for System Clock and delay rountines
TIMER1_Init();
// initialize the LEDs (needs Timer 1)
Led_Init();
// initialize the debug UART1
Uart1Baudrate = 57600;
UART1_Init();
I2CBus_Init(I2C1);
/trunk/main.h
8,6 → 8,8
#define FOLLOW_ME
#endif
 
//#define DATAPLOTTER // only for sing NC-Positions on the KopterTool map
 
#ifdef FOLLOW_ME
extern u8 TransmitAlsoToFC;
#endif
/trunk/spi_slave.c
488,6 → 488,17
ToFlightCtrl.Param.Byte[4] |= KM_BIT_EXTCNTRL; // Bit: there is External Control in the Data
memcpy((u8 *) &(ToFlightCtrl.Param.Byte[13]), (u8 *) &ExternControl, 7); // 6 Bytes External Control
}
// 0 = 0,1
// 1 = 2,3
// 2 = 4,5
// 3 = 6,7
// 4 = 8,9
// 5 = 10,11
// 6 = 12,13
// 7 = 14,15
// 8 = 16,17
// 9 = 18,19
ToFlightCtrl.Param.Int[8] = FromLaserCtrl.Distance; // Bytes 16 & 17
break;
 
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/trunk/startup912.s
40,6 → 40,7
#*************************************************************************
.equ SRAM_SETUP , 1 /* Enable setup of SRAM */
.equ FMI_SETUP , 0 /* Enable FMI Setup */ /* already done by bootloader */
#.equ FMI_SETUP , 1 /* Enable FMI Setup */
.equ CLOCK_SETUP , 1 /* Enable clock setup */
.equ ETM_SETUP , 0 /* Enable ETM setup */
 
62,10 → 63,10
.equ FMI_BBADR_Val , 0x00000000 /* 00 */
.equ FMI_NBBSR_Val , 0x00000002 /* 02 */
.equ FMI_NBBADR_Val , 0x00080000 /* 80000 */
#.equ FMI_NBBADR_Val , 0x00200000
.equ FLASH_CFG_Val , 0x00001010
.equ FMI_SR_Val , 0x00000003 /* Clear status errors (register not in STR912 manual! */
 
# System Control Unit (SCU) definitions
.equ SCU_BASE , 0x5C002000 /* SCU Base Address (non-buffered) */
.equ SCU_CLKCNTR_OFS , 0x00 /* Clock Control register Offset */
/trunk/timer1.c
114,7 → 114,7
{
TIM_InitTypeDef TIM_InitStructure;
 
UART1_PutString("\r\n Timer1 init...");
// UART1_PutString("\r\n Timer1 init...");
 
#define TIM1_FREQ 200000 // 200kHz
// TimerOCR set in IntHandler
146,7 → 146,7
 
CountMilliseconds = 0;
 
UART1_PutString("ok");
// UART1_PutString("ok");
 
}