示例#1
0
/*
 * Application entry point.
 */
int main(void) {

  /*
   * System initializations.
   * - HAL initialization, this also initializes the configured device drivers
   *   and performs the board-specific initializations.
   * - Kernel initialization, the main() function becomes a thread and the
   *   RTOS is active.
   */
  halInit();
  chSysInit();

  fsmcSramInit();
  fsmcSramStart(&SRAMD4, &sram_cfg);

  membench();
  memtest();

  /*
   * Normal main() thread activity, in this demo it does nothing.
   */
  while (TRUE) {
    chThdSleepMilliseconds(500);
  }
}
示例#2
0
void fpgaStart(FPGADriver *fpgap) {

  fsmcSramInit();
  fsmcSramStart(&SRAMD1, &sram_cfg);

  while ( ! FPGAReady()) {
    orange_led_on();
    osalThreadSleepMilliseconds(30);
    orange_led_off();
    osalThreadSleepMilliseconds(70);
  }

  fpgap->memspace = (fpgaword_t *)FSMC_Bank1_1_MAP;
  fpgap->state = FPGA_READY;
}