Hard fault while calling function (EP1_IN_Callback) by pointer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-24 09:46 AM
I am developing program for usb communication and i am using 'STM32_USB-FS-Device_Driver' library in atollic true studio.
in USB communication when EP2_OUT_Callback is working properly. but during interrupt for EP1_IN_Callback hard fault occurs.
on further investigation i found that EP1_IN_Callback pointer address is '134217776' (i.e. even address and hence causing hard fault)
i tried using _packed keyword but compiler ignores it.
how can i solve the issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-24 08:33 PM
I further investigated the issue and here are my observations
in map file address of EP1_IN_Callback is 0x0800231c.
whereas while calling the function by pointer; pointer points to 0x08000030
Things are working fine for EP2_OUT_Callback
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-24 09:49 PM
I have resolved the issue. the pointer value was getting overwritten due to array overrun
