2012-08-24 05:51 AM
hi
i have a problem with the stm32w mb851a i would generate a random number. i have try to use the function rand() and I include header filebut when i execute the program it jump at void __attribute__ ((weak)) Default_Handler(){ /* Hang here */ while(1) { }}why?this is my include files&sharpinclude PLATFORM_HEADER&sharpinclude BOARD_HEADER&sharpinclude ''hal/hal.h''&sharpinclude ''hal/micro/cortexm3/uart.h''&sharpinclude ''hal/micro/micro-common.h''&sharpinclude ''hal/micro/cortexm3/micro-common.h''&sharpinclude ''include/phy-library.h''&sharpinclude ''hal/error.h''&sharpinclude <stdio.h>&sharpinclude <stdlib.h>&sharpinclude ''hal/micro/temperature_sensor.h''&sharpinclude <time.h>&sharpinclude <math.h>...int main(){int a=0;..... srand(time(NULL)); a=rand();....} #duplicate-post2012-08-24 08:55 AM
Cross posting, see answer/suggestion in STM32 forum
2012-08-24 11:17 AM
/7210dc85