forked from Firmware/Firmwares
add wait for both spn interrupts
This commit is contained in:
parent
1b09899d2a
commit
a70f5bb09c
Binary file not shown.
@ -66,6 +66,17 @@ void wait_for_spn2_interrupt() {
|
|||||||
spn2_hw_interrupt=true;
|
spn2_hw_interrupt=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wait_for_spn_interrupts() {
|
||||||
|
if(spn1_hw_interrupt || spn2_hw_interrupt) {
|
||||||
|
do{
|
||||||
|
asm("wfi");
|
||||||
|
asm("nop");
|
||||||
|
}while(spn1_hw_interrupt || spn2_hw_interrupt);
|
||||||
|
}
|
||||||
|
spn1_hw_interrupt=true;
|
||||||
|
spn2_hw_interrupt=true;
|
||||||
|
}
|
||||||
|
|
||||||
/*!\brief initializes platform
|
/*!\brief initializes platform
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -97,8 +97,7 @@ int main() {
|
|||||||
for (int k = 0; k < iterations*step; k+=step) {
|
for (int k = 0; k < iterations*step; k+=step) {
|
||||||
run_xspn1(in_addr, out_addr1, step, in_beats, out_beats);
|
run_xspn1(in_addr, out_addr1, step, in_beats, out_beats);
|
||||||
run_xspn2(in_addr, out_addr2, step, in_beats, out_beats);
|
run_xspn2(in_addr, out_addr2, step, in_beats, out_beats);
|
||||||
wait_for_spn1_interrupt();
|
wait_for_spn_interrupts();
|
||||||
wait_for_spn2_interrupt();
|
|
||||||
printf("XSPN finished\n");
|
printf("XSPN finished\n");
|
||||||
spn_checker::offset_reg() = k;
|
spn_checker::offset_reg() = k;
|
||||||
spn_checker::length_reg() = step;
|
spn_checker::length_reg() = step;
|
||||||
|
Loading…
Reference in New Issue
Block a user