I stored +34000 lines of 16-bit data on flash memory. The code works good; but, I have two issues that I don't understand why they are happening. After running the code, I am able to see all data on the serial port without a problem. The issue arises after I close the serial port and I reopen it back on again. No data shows at all. Is that a something related to my code, or teensy.? The second issue happens while loading/compiling. Some messaggges appear at the bottom of the screen but I the end code compiles and uploads without problem. The messages are : "
eensyMemoryBench:34145: warning: narrowing conversion of '4406636708352ll' from 'long long int' to 'uint16_t {aka short unsigned int}' inside { }
TeensyMemoryBench:34145: warning: large integer implicitly truncated to unsigned type
TeensyMemoryBench:34145: warning: narrowing conversion of '4406636708352ll' from 'long long int' to 'uint16_t {aka short unsigned int}' inside { }
TeensyMemoryBench:34145: warning: large integer implicitly truncated to unsigned type
TeensyMemoryBench:34145: warning: narrowing conversion of '4406636708352ll' from 'long long int' to 'uint16_t {aka short unsigned int}' inside { }
TeensyMemoryBench:34145: warning: large integer implicitly truncated to unsigned type
TeensyMemoryBench:34145: warning: narrowing conversion of '1224736841' from 'int' to 'uint16_t {aka short unsigned int}' inside { }
TeensyMemoryBench:34145: warning: large integer implicitly truncated to unsigned type
TeensyMemoryBench:34145: warning: narrowing conversion of '1224736841' from 'int' to 'uint16_t {aka short unsigned int}' inside { }
TeensyMemoryBench:34145: warning: large integer implicitly truncated to unsigned type
TeensyMemoryBench:34145: warning: narrowing conversion of '1224736841' from 'int' to 'uint16_t {aka short unsigned int}' inside { }
Are those messages because the data is bad somehow? or is this a normal step while processing the data.
Finally, another question that I need to get help with is how many more lines of data, same format "111111111111111", can I add to the teensy 3.6 flash memory?
I am pretty fairly new to teensy.
Thanks very much
eensyMemoryBench:34145: warning: narrowing conversion of '4406636708352ll' from 'long long int' to 'uint16_t {aka short unsigned int}' inside { }
TeensyMemoryBench:34145: warning: large integer implicitly truncated to unsigned type
TeensyMemoryBench:34145: warning: narrowing conversion of '4406636708352ll' from 'long long int' to 'uint16_t {aka short unsigned int}' inside { }
TeensyMemoryBench:34145: warning: large integer implicitly truncated to unsigned type
TeensyMemoryBench:34145: warning: narrowing conversion of '4406636708352ll' from 'long long int' to 'uint16_t {aka short unsigned int}' inside { }
TeensyMemoryBench:34145: warning: large integer implicitly truncated to unsigned type
TeensyMemoryBench:34145: warning: narrowing conversion of '1224736841' from 'int' to 'uint16_t {aka short unsigned int}' inside { }
TeensyMemoryBench:34145: warning: large integer implicitly truncated to unsigned type
TeensyMemoryBench:34145: warning: narrowing conversion of '1224736841' from 'int' to 'uint16_t {aka short unsigned int}' inside { }
TeensyMemoryBench:34145: warning: large integer implicitly truncated to unsigned type
TeensyMemoryBench:34145: warning: narrowing conversion of '1224736841' from 'int' to 'uint16_t {aka short unsigned int}' inside { }
Are those messages because the data is bad somehow? or is this a normal step while processing the data.
Finally, another question that I need to get help with is how many more lines of data, same format "111111111111111", can I add to the teensy 3.6 flash memory?
I am pretty fairly new to teensy.
Thanks very much
Code:
const uint16_t NUMBER_OF_ELEMENTS = 34140;
const uint16_t descriptions[NUMBER_OF_ELEMENTS] =
{
// All 34000 Lines of data...
0000011100000111,
0000011100000111,
0000011100000111,
0000011100000111,
0000011100000111,
0000010100000101,
0000010100000101,
0000010100000101,
0000010100000101,
1110000011100000,
1110000011100000,
1110000011100000,
1110000011100000,
1110000011100000,
1110000011100000,
1110000011100000,
1111000011110000,
1111000011110000,
1111000011110000,
1111000011110000,
1111000011110000,
1111000011110000,
1111000111110001,
1111000111110001,
1111000111110001,
1111000111110001,
1111001111110011,
1111001111110011,
1111001111110011,
1111001111110011,
1111001111110011,
};
int bitNumber;
int totalBits;
String alphaChannels ;
unsigned int displayByte;
void setup ()
{
Serial.begin (115200);
Serial.println ();
while (!Serial && millis() < 6000) ;
for (unsigned k = 0; k < 34140; k++)
{
displayByte = descriptions[k];
alphaChannels = String(displayByte, BIN);
totalBits = alphaChannels.length();
Serial.print(k);
Serial.print("-) ");
Serial.print(totalBits);
Serial.print("* ");
Serial.print(alphaChannels);
Serial.print("* ");
Serial.print(displayByte, DEC);
Serial.print("* ");
Serial.println();
delay(5);
}
}
void loop () {}