cancel
Showing results for 
Search instead for 
Did you mean: 

Load the buffer

Diwakar Ragupathy Raj
Associate II
Posted on April 25, 2018 at 19:34

Hi, 

I am working in STM3241G-EVAL, and i am trying to load the buffer with all black pixel values but i am getting an error saying 'Expression is not assignable'

/*Camera Application header file*/

#define CAMERA_FRAME_BUFFER 0x64100000

/* Camera Initialization*/

void CAMERA_Init(void)

{

/* Initialize the Camera */

CameraError = BSP_CAMERA_Init(RESOLUTION_R320x240);

BSP_CAMERA_BlackWhiteConfig(CAMERA_BLACK_WHITE_BW);

if( CameraError != CAMERA_ERROR)

{

GUI_Delay(100);

/* Start the capture */

BSP_CAMERA_ContinuousStart((uint8_t *)CAMERA_FRAME_BUFFER);

CAMERA_Set_ContrastBrightness(CameraSettings.b.contrast, CameraSettings.b.brightness);

}

}

/*Trying to put white color in all pixel*/

for (i = IMAGE_COLUMN_SIZE; i > 0; i-- )

{

for ( j = 0; j < 2 * IMAGE_LINE_SIZE; j += 2 )

{

CAMERA_FRAME_BUFFER = 0xFFFF; // I have error in this statement

}

}

Please help me solve this.

4 REPLIES 4
AvaTar
Lead
Posted on April 26, 2018 at 08:18

#define CAMERA_FRAME_BUFFER 0x64100000

...

CAMERA_FRAME_BUFFER = 0xFFFF; // I have error in this statement

Because an immediate value is not an object, you can't assign anything to it.

This is a C language issue.

Posted on April 26, 2018 at 08:32

Can you please help me how to assign values to the buffer 'CAMERA_FRAME_BUFFER'

Posted on April 26, 2018 at 09:27

A good C tutorial should tell you how to assign a fixed address to a pointer variable.

Or see the stm32fxxx.h device header files - they contain plenty of examples, defining/assigning addresses of MCU peripherals.

Posted on April 26, 2018 at 09:32

thanks a lot