Did you alrady try to set the BLE to a higher priority (0 is highest)
Thanks for the prompt answer.
I have increased to level 0. I did it from the Interrupt tab of Design Wide Resources. Yet no change. Still can not connect to the tablet.
Looking at your project, you are not setting the interrupt routine of the ADC correctly:
Try it with AdcStart() modified to the following:
ADC_Start(); /* Initialize ADC */
//ADC_IRQ_Enable(); /* Enable ADC interrupts */
ADC_IRQ_Start();//Either this or ADC_IRG_StartEx(<callback function>) will work
ADC_StartConvert(); /* Start ADC conversions */
When you are calling ADC_IRQ_Enable(), that only allows the interrupt to fire for the ADC component, but doesn't setup the callback vector, priority, and handling fully.
ADC_IRQ_Start() is what I believe you were looking for.
Thanks for the tip! Unfortunately not a fix in my case.
So I have tried it - no connection. I have deleted the ADC and the clock and left the 2 sensor pins. Commented the lines:
and further commented the lines:
Clean, Compile, Program -> the connection is successful.
Then I have added the ADC component, connected to the pins. I did NOT take the comments off the above lines, i.e. the above lines that start the ADC are still not executed.
Clean, Compile, Program -> the connection cannot be established.
Meanwhile I will try with different components on the design, to try to figure out a pattern...
I made it work. The only problem is that I have no idea how. What I did is experimenting:
- taking the ADC out - connecting OK
- placing an IDAC - Connecting OK.
- taking IDAC out - connecting OK
- placing ADC with default settings - Connecting OK
- starting ADC - connecting OK.
Then windows crashed during build, and corrupted the project. I loaded the original version and NO communication again. Changed the ADC_IRQ function to Start, still no communication.
Conclusion: somehow the settings on the ADC are responsible for the lack of communication.
I will continue with the tryouts. I will update when having result.
Try setting your clock to be internal, and the clock frequency to be 1100.000 kHz.
Also, see if putting some resistance between the ADC and your sensor left/right helps out.
1 of 1 people found this helpful
*The following is a *guess* *
I recently found out on the PSOC5 (Yes, I know this is PSOC4) that adjacent *analog* pins have issues when there are digital signals on them at a high frequency. This caused some analog and digital features to not work properly. The fix was to put slow moving signals between the high frequency signals if they also occupied analog pins.
Check your part to see if you have high frequency digital signals next to your Bluetooth radio signals. If so, move them a pin or two away and see if that fixes anything.
Also, I found the order in which I added components to the system could cause an issue with digital routing. (Race conditions).