-
1. Re: BLE not connecting when adding ADC on PSoC4
bob.marlowe Jan 21, 2018 8:27 AM (in response to user_367532087)Did you alrady try to set the BLE to a higher priority (0 is highest)
Bob
-
2. Re: BLE not connecting when adding ADC on PSoC4
user_367532087 Jan 21, 2018 4:22 PM (in response to bob.marlowe)Hi Bob,
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.
Thanks,
Stoyan
-
3. Re: BLE not connecting when adding ADC on PSoC4
e.pratt_1639216 Jan 22, 2018 8:39 AM (in response to user_367532087)Looking at your project, you are not setting the interrupt routine of the ADC correctly:
Try it with AdcStart() modified to the following:
void AdcStart()
{
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.
-
4. Re: BLE not connecting when adding ADC on PSoC4
user_367532087 Jan 22, 2018 6:10 PM (in response to e.pratt_1639216)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:
ADC_Start ();
ADC_IRQ_Start ();
ADC_StartConvert ();
and further commented the lines:
ADC_StopConvert ();
ADC_Stop ();
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.
Any ideas?
Meanwhile I will try with different components on the design, to try to figure out a pattern...
Thanks!
-
5. Re: BLE not connecting when adding ADC on PSoC4
user_367532087 Jan 22, 2018 8:03 PM (in response to user_367532087)Update:
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.
Cheers,
Stoyan
-
6. Re: BLE not connecting when adding ADC on PSoC4
e.pratt_1639216 Jan 23, 2018 8:18 AM (in response to user_367532087)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.
-
7. Re: BLE not connecting when adding ADC on PSoC4
user_463759797 Jan 29, 2018 9:35 AM (in response to user_367532087)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).