-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mita ADC command does not properly setup channels #268
Comments
If I understand the ADC correctly what you're describing is connecting the microphone to the ADC channel 4. This is not always what you want to do if you want to measure this channel though. Therefore I don't think that always connecting the microphone for
I hope this helps! |
Since I got no response I'll assume this issue is solved. Feel free to respond if you still have problems. |
Hello wegendtbosch, Unfortunately, I have to ask you to take a second look, Aside from that, the noise sensor usage with ch4 was copied from the WB 3.5 release notes which should, in that case, be corrected there or in Mita. The ADC is initialized and enabled but reading an invalid configured input pin regardless of what channel is to be read due to missing initialization of the pin, therefore it returns weird readouts. If you also check the generated includes in the files, there is no mention of a module that could be used to initialize the GPIOs as well. Therefore the GPIOs are not defined as inputs. To solve this, a call of the functions BSP_ExtensionPort_ConnectAdc() and BSP_ExtensionPort_EnableAdc() from the BSP_ExtensionPort.h interface with the corresponding pin would be required. Kind Regards |
Ok, thanks for the additional feedback! |
When using the
setup adc
in Mita with the XDK workbench for the ADC channel the code generated does not correctly set up the pin configuration for the channels.when using the following code:
It generates a config for the given channel in the file ConnectivityADCAdc.c and initializes the ADC with it.
But it is missing a pin configuration for the used pins. In case of the used microphone, there is also no voltage supply enabled for the microphone. For using the microphone, the function calls of
BSP_Mic_AKU340_Connect()
andBSP_Mic_AKU340_Enable()
are needed in the functionConnectivityADCAdc_Setup()
in the generated C code.For the other ADC channels, the function calls to configure the pins as inputs and connecting to them are missing too and would need to be added in the same manner as for the microphone.
The text was updated successfully, but these errors were encountered: