Very strange .bss RAM overflow
Hello!
Thanks for the reply, I’ll try to answer as good as possible.
The function HighDensSequentialRead reads on the I2C bus and writes in the char array eecpy. I’m sending the pointer to that function.
#define AdrGradScale 0x08
void HighDensSequentialRead(unsigned short address, unsigned char* data, unsigned short numbytes) { unsigned char reg_data [] = { ((unsigned char)((address&0xFF00)>>8)) , ((unsigned char)(address&0xFF)) }; HAL_I2C_Master_Sequential_Transmit_IT(&hi2c1,EEPROM_ADR,reg_data,2,I2C_FIRST_FRAME); //write(ControlByte) while (HAL_I2C_GetState(&hi2c1) != HAL_I2C_STATE_READY); HAL_I2C_Master_Sequential_Receive_IT(&hi2c1,EEPROM_ADR,data,numbytes,I2C_FIRST_AND_LAST_FRAME ); while (HAL_I2C_GetState(&hi2c1) != HAL_I2C_STATE_READY); return; }
void IR_Sensor_Read(void) { unsigned short gradScale; unsigned char eecpy[ 8 ] = ""; HighDensSequentialRead((unsigned short)AdrGradScale,eecpy,sizeof(char)*2); gradScale = ((0x00 (double left arrow) 8) | eecpy[0]); return; }
This seems to be related to something regarding the array, since I can define a float both local and global without any problem.
Shift left (double arrow) will not format in the code parser..?
B.R/