Missing functions

Announcements

Webinar: Integrated solutions for smaller, simpler low-voltage motor control design.
Join the webinar to experience!

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User19138
Level 1
Level 1
In the code (in isr_defines.h) I see

#ifndef ADC2_VCP_LO_CALLBACK
#define ADC2_VCP_LO_CALLBACK BDRV_Diag_Supply
#endif

#ifndef BDRV_HS1_OC_CALLBACK
#define BDRV_HS1_OC_CALLBACK BDRV_Diag
#endif


But there is no BDRV_Diag_Supply or BDRV_Diag in the code. Do the functions exist at all?
0 Likes
9 Replies
User17857
Level 3
Level 3
First like received
I have searched for the functions in arm keil and i have this in bdrv.h.

* V0.1.1: 2013-05-24, DM: Bdrv_Diag functions removed
* Bdrv_Clr_Sts changed, to be robust agains
* unintened flag clearing
* Open-Load detection function added

and for ADC2_VCP_LO_CALLBACK();
as i understand from this

#ifndef ADC2_VCP_LO_CALLBACK
#define ADC2_VCP_LO_CALLBACK place_your_function_call_back_here
#endif

you should define your own function. but i am not sure.
0 Likes
User19138
Level 1
Level 1
if Bdrv_Diag function removed what replacement function instead? Do we need thees interrupts and its callback functions?
0 Likes
User17857
Level 3
Level 3
First like received
I think you can use bdrv_clr_sts in place of bdrv_diag. I dont know what exactly they will do, but here is clue for you. the code below is an example that show how to use bdrv_clr_sts.

* \brief This example enables BDRV LS1, LS2, HS1 and HS2 Over-Current Interrupt.
* ~~~~~~~~~~~~~~~{.c}
* void Example_Function(void)
* {
* BDRV_Clr_Sts(LS1_OC | LS2_OC | LS3_OC | HS1_OC | HS2_OC | HS3_OC);
* }
* ~~~~~~~~~~~~~~~
* \ingroup bdrv_api
*/
0 Likes
User19138
Level 1
Level 1
muratrazi wrote:
I think you can use bdrv_clr_sts in place of bdrv_diag. I dont know what exactly they will do, but here is clue for you. the code below is an example that show how to use bdrv_clr_sts.

* \brief This example enables BDRV LS1, LS2, HS1 and HS2 Over-Current Interrupt.
* ~~~~~~~~~~~~~~~{.c}
* void Example_Function(void)
* {
* BDRV_Clr_Sts(LS1_OC | LS2_OC | LS3_OC | HS1_OC | HS2_OC | HS3_OC);
* }
* ~~~~~~~~~~~~~~~
* \ingroup bdrv_api
*/


Thank you. The question is do we need it? There is no clear explanation provided with the code. I'm not sure I can use the board in serious projects.
0 Likes
Elettrograffiti
Employee
Employee
Hi John. May I ask which product and board are you workng with?
In the ISR_defines.h header you can find the definition of the inturrupts and their enable values. Our SDK is designed in order to be used with the ConfigWizard. Currently we are at its V2 version. If you are using an older version of the SDK I would suggest to uplad it or to reinstall following the procedures indicated in our website:
https://www.infineon.com/cms/en/product/microcontroller/embedded-power-ics-system-on-chip-/3-phase-b...

Back to your question, if you open the config wizard from within the Kiel project (main menu->Tools->configWizard v2) you can see that it is composed of several panes, each one related to a subsystem of our SOCs.
You can find here, for almost each interrupt service routine, a check box that enables it and a dialog that defines its name. When you hoover your mouse cursor on an item it will show you the properties of those items giving you an indication of where it is related in the code.
In your case:
4111.attach

In conclusion, if you are using our SDK for the project we suggest to keep all the defines you see and then, once your project is finished you could discard all the ones you don't use.

I hope this was helpful.
0 Likes
User19138
Level 1
Level 1
Thank you. I'll try the wizard.
I have an axis manager that drives 1-4 motors, depends on a project, so the shield would be perfect if I'll manage to work with it.
0 Likes
User19138
Level 1
Level 1
Well... The Config Wizard is working only with Keil installed. I ported the project to IAR...
0 Likes
User17857
Level 3
Level 3
First like received
because i did not know what is your aim i can not answer your question 🙂 if you can tell me what is your aim exactly maybe i can answer your question
0 Likes
User19138
Level 1
Level 1
muratrazi wrote:
because i did not know what is your aim i can not answer your question 🙂 if you can tell me what is your aim exactly maybe i can answer your question

Thank you
.
I see in isr_defines.h (for FOC)

#ifndef BDRV_HS1_OC_CALLBACK
#define BDRV_HS1_OC_CALLBACK BDRV_Diag
#endif

#ifndef BDRV_HS1_OC_INT_EN
#define BDRV_HS1_OC_INT_EN 1
#endif

But there is no BDRV_Diag existed.
0 Likes