Re: Problem with ADC PIC32 High Speed SAR Block and PIC32MZ2048EFM144
Thanks for reporting this issue including Diagnostic message and model example.
This is an issue from the blockset.
Please download the .p file attached, and replace the existing file in the blockset installation folder (blocks subfolder ; type picInfo('check') to find the blockset installation folder). This file should fix the issue for the PIC32MZ2048EFM144 only.
at matlab prompt to refresh matlab path, then make a "clean build" from the microchip menu.
The ADC PIC32 High Speed SAR block assumed that AN channel above 31 belong to ADC class3 and others one belongs to class 2 and 1. This assumption is incorrect. In fact, this "31" threshold depends on chip. The configuration code is slightly different.
For the targeted chip PIC32MZ2048EFM144, the threshold is 12.
The issue will be fix with the next blockset release.