LyleHaze wrote:[edit] After some thought, Mode 1:0 MUST be at 01b, because Xena
was running at 1/4 Speed before we added the oscillator adjustment
to the toolchain.
More information on oscillator selection may be found in the
XS1-L System Specification pdf on page 21.
Boot source selection is in the same document on page 1.
LyleHaze wrote: leaving you with a Xena-ready project.
/*
* xenaflash.xc
*/
#include <xs1.h>
#include <platform.h>
#define PERIOD 20000000
on stdcore [1] : port pin_LPC_AD = XS1_PORT_16A;
on stdcore [1] : port in pin_ALE = XS1_PORT_1A;
on stdcore [1] : port in pin_WE = XS1_PORT_1B;
on stdcore [1] : port in pin_OE = XS1_PORT_1C;
on stdcore [1] : port in pin_CS = XS1_PORT_1D;
on stdcore [0] : port out pin_nemo0 = XS1_PORT_1K;
on stdcore [0] : port out pin_xena0 = XS1_PORT_1A;
on stdcore [1] : port out pin_nemo1 = XS1_PORT_1E;
on stdcore [1] : port out pin_xena1 = XS1_PORT_1K;
on stdcore [1] : port in pin_IRQ = XS1_PORT_1F;
void tokenFlash (out port nemo, out port xena, int period) {
timer tmr;
unsigned t;
while (1) {
nemo <: 1;
xena <: 1;
tmr :> t;
tmr when timerafter (t+ period ) :> void;
nemo <: 0x0;
xena <: 0x0;
tmr :> t;
tmr when timerafter (t+ period ) :> void;
}
}
int main (void) {
par {
// tile 0 slow flash
on stdcore [0] : tokenFlash (pin_nemo0, pin_xena0, (PERIOD*30));
// tile 1 fast flash
on stdcore [1] : tokenFlash (pin_nemo1, pin_xena1, (PERIOD*5));
}
return 0;
}
Return to Platform: AmigaOne X1000
Users browsing this forum: No registered users and 2 guests