I somehow bricked my itsybitsy m0.
I uploaded some sktech to compare performance of ram to internal flash, and after that..
I have while(!Serial); before doing anything in the sketch.
- I connect the board with usb to pc, comport comes up
when i try to upload, there is an error.
when i try to double click, com port goes away, led is NOT fading, no alternate comport comes up
when i connect the comport, there are some outputs of my programm, but it is not running to the end.
Some ideas what I can do to repair this?
Anyway, I also do not unerstand what may cause this problem. Output stops a "rampointer").
Code: Select all
void setup() {
Serial.begin(115200);
while(!Serial);
uint32_t sum = 0;
uint16_t* ptr = (uint16_t*)0x30000;
Serial.println("flashpointer:");
//Serial.println(ptr);
int i = 0;
bool found = false;
uint32_t start = micros();
for(i = 0;i<8000;i++)
{
if(*(ptr+2*i) != 0xab)
{
sum = sum + *(ptr+2*i);
}
}
uint32_t ende = micros();
Serial.println("flashaccess:");
Serial.println(ende - start);
Serial.println(sum);
sum = 0;
uint16_t mytable[8000];
ptr = mytable;
Serial.println("rampointer:");
//Serial.println(ptr);
start = micros();
for(i = 0;i<8000;i++)
{
if(*(ptr+2*i) == 0xab)
{
sum = sum + *(ptr+2*i);
}
}
ende = micros();
Serial.println("ramaccess:");
Serial.println(ende - start);
Serial.println(sum);
}
void loop() {
// put your main code here, to run repeatedly:
}