6 Replies Latest reply on Sep 7, 2015 1:04 AM by user_14586677

    First Impressions with PSOC4 Motor Kit and PSOC4 In General




      I come from the Alt*ra world (FPGAs with soft Nios processor), so this is my first look at using something different..


      Aside from a few quirks, like the 'Find All Active References' not finding all the active references,  I think the PSoc Creator is a very good tool...   the design flow is intuitive and user-friendly.   I still haven't played with it enough to know if I I'll be able to implement custom logic in Verilog, but I like what I see so far.


      My biggest concern at the moment however, is (2) issues with the Arm debugging for the Motor Kit.  ( I'm using the Pioneer Kit with the Sensorless BLDC example, C:\Program Files (x86)\Cypress\CY8CKIT-037 Motor Control EVK\1.0\Firmware\Example Projects\Sensorless BLDC Motor Control).


      #1 Once 'CyGlobalIntEnable' is executed.  I can no longer single step in/over any code.  Instead stepping always puts me in the 'CY_ISR(PWM_Drive_ISR)' .  To get around this, I use breakpoint with 'run' resume only (no stepping).   Other times, the program will execute (Led D9 will blink), but no breakpoint (including the one in CY_ISR) ever hits.. instead when I pause it, the code is in 'CyDelayCycles'.


      #2 The reason I'm debugging is because the motor fails to run, presumably because the state machine in the code never changes from STOPPED to NORMALRUN.    What's strange however, is that the watch window shows all the correct variable values needed for it to execute BLDC_Start(), i.e. No Error, runFlag==TRUE, and restartFlag==TRUE.    See attached animated gif.




              if((BLDC_Control.errorCode == NO_ERROR) && (BLDC_Control.runFlag == TRUE) && (restartFlag == TRUE))




      Any suggestions what I could be doing wrong to cause this? I'm using the Creator 3.2 on the Pioneer Kit, running the example with no changes.