comparison Small_CPU/Src/baseCPU2.c @ 148:ee744c7160ce FlipDisplay

Use SPI TX callback to synchronize to main CPU
author Ideenmodellierer
date Sat, 02 Mar 2019 17:01:06 +0100
parents 0586ae83a243
children c659fda83e44
comparison
equal deleted inserted replaced
147:14e4c83a7559 148:ee744c7160ce
162 162
163 // SHALL LOAD AT 0x08000000 + 0x00005000 = 0x08005000. 163 // SHALL LOAD AT 0x08000000 + 0x00005000 = 0x08005000.
164 // See CPU2-RTE.ld 164 // See CPU2-RTE.ld
165 const SFirmwareData cpu2_FirmwareData __attribute__(( section(".firmware_data") ))= { 165 const SFirmwareData cpu2_FirmwareData __attribute__(( section(".firmware_data") ))= {
166 .versionFirst = 1, 166 .versionFirst = 1,
167 .versionSecond = 6, 167 .versionSecond = 7,
168 .versionThird = 0, 168 .versionThird = 0,
169 .versionBeta = 0, 169 .versionBeta = 0,
170 170
171 /* 4 bytes with trailing 0 */ 171 /* 4 bytes with trailing 0 */
172 .signature = "mh", 172 .signature = "mh",
382 SPI_synchronize_with_Master(); 382 SPI_synchronize_with_Master();
383 MX_DMA_Init(); 383 MX_DMA_Init();
384 MX_SPI1_Init(); 384 MX_SPI1_Init();
385 MX_EXTI_wireless_Init(); 385 MX_EXTI_wireless_Init();
386 SPI_Start_single_TxRx_with_Master(); /* be prepared for the first data exchange */ 386 SPI_Start_single_TxRx_with_Master(); /* be prepared for the first data exchange */
387 dohardspisync = 1;
387 EXTI_Test_Button_Init(); 388 EXTI_Test_Button_Init();
388 389
389 /* 390 /*
390 uint8_t dataWireless[64]; 391 uint8_t dataWireless[64];
391 while(1) 392 while(1)
477 GPIO_Power_MainCPU_Init(); 478 GPIO_Power_MainCPU_Init();
478 GPIO_Power_MainCPU_ON(); 479 GPIO_Power_MainCPU_ON();
479 compass_init(0, 7); 480 compass_init(0, 7);
480 accelerator_init(); 481 accelerator_init();
481 wireless_init(); 482 wireless_init();
482 // SPI_synchronize_with_Master(); TODO: REMOVE 483 SPI_synchronize_with_Master();
483 MX_DMA_Init(); 484 MX_DMA_Init();
484 MX_SPI1_Init(); 485 MX_SPI1_Init();
485 MX_EXTI_wireless_Init(); 486 MX_EXTI_wireless_Init();
486 // SPI_Start_single_TxRx_with_Master(); 487 SPI_Start_single_TxRx_with_Master();
487 488
488 // EXTILine0_Button_DeInit(); not now, later after testing 489 // EXTILine0_Button_DeInit(); not now, later after testing
489 break; 490 break;
490 } 491 }
491 492