int32_t s1[BUF_LEN], s2[BUF_LEN], s3[BUF_LEN];
volatile int buf_full = 0;
-void adc_irq() __attribute__((interrupt));
+void adc_irq() __attribute__((interrupt,section(".data")));
+//void sig_agc_send() __attribute__((section(".data")));
+//void sig_send_loop() __attribute__((section(".data")));
void timer_init(uint32_t prescale, uint32_t period) {
T0PR = prescale - 1;
led_set(LED_GRN, 0);
}
+void sig_send_loop() {
+ for (;;)
+ sig_agc_send();
+}
+
int main() {
+ cli();
led_init();
/* switch the CAN off due to clock change */
can_off();
/* VPB=60MHz; 1000kb/s TSEG1=6, TSEG2=3, SJW=00 */
can_init(0x250005, 14, NULL);
msg.id = CANLOAD_ID;
+ sti();
#ifdef DBG_FFT_TEST
for (;;)
pwm_init(1, 833);
sync_pwm_timer((uint32_t*)&T0TC);
- for (;;)
- sig_agc_send();
+ /***
+ * !?FIXME?! Proc je tu tahle blbost?
+ * nevim, ale bez tohohle prostouchnuti trubek
+ * to za nekterych okolnosi nejede :-\
+ ***/
+ msg.id = 0x0; msg.dlc = 0;
+ while (can_tx_msg(&msg));
+
+ sig_send_loop();
+ /* let Sappho make herself happy: */
+ return 0;
}