• AVR Freaks

Hot!MPLABX v5.40 PIC18F27Q10 simulator crash when PWM2 enabled

Author
dan1138
Super Member
  • Total Posts : 3990
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
2020/07/08 17:58:07 (permalink)
5 (1)

MPLABX v5.40 PIC18F27Q10 simulator crash when PWM2 enabled

The attached MCC project for MPLABX v5.40 configures a PIC18F27Q10 to output a 50% square wave on RC1.
 
The fault is the simulation stops as soon at the EN bit in the CCP2CON register is set.
 
I know Microchip has thousands of test vectors for the simulation tool but, how does a coder fail to check that the simulation model crashes the simulator when the default configuration is enabled?
 
OK, Microchip perhaps you can no longer stand tall, but at least stand up.
 
I so hope I am wrong. That I've done something stupid. The code I attached is a 100% creation of MCC.
#1

4 Replies Related Threads

    GeorgePauley
    Moderator
    • Total Posts : 1274
    • Reward points : 0
    • Joined: 2009/12/01 13:59:30
    • Location: Chandler AZ
    • Status: offline
    Re: MPLABX v5.40 PIC18F27Q10 simulator crash when PWM2 enabled 2020/07/09 10:45:43 (permalink)
    +2 (2)
    Yep, CCP is broken for 18F27Q10.  I've written a bug report which will get addressed at some point in the future.

    As to your question about how this gets through testing, its simple:  There's no test for CCP for 18F27Q10.  There are tests for that CCP, but not for 18F27Q10.  There are tests for 18F27Q10, but not against CCP.
    #2
    dan1138
    Super Member
    • Total Posts : 3990
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: MPLABX v5.40 PIC18F27Q10 simulator crash when PWM2 enabled 2020/07/09 16:13:35 (permalink)
    +1 (1)
    GeorgePauley
    As to your question about how this gets through testing, its simple:  There's no test for CCP for 18F27Q10.  There are tests for that CCP, but not for 18F27Q10.  There are tests for 18F27Q10, but not against CCP.

    No test for the PIC18F27Q10 CCP simulation model is the reason the simulation tool got released with a fault that would cause the simulator to crash.

    That this test was not present for the PIC18F27Q10 CCP simulation model shows that the Microchip simulation tool development team has a systemic failure of process.

    My issue here is not this specific, and trivial, fault in a simulation model but the fact that the Microchip development process cannot find these kinds of faults before the release candidate is committed.

    This is not a situation isolated to just the simulation tool development. The pic-as(v2.20) tool chain has a trivial fault with integration into the development environment. With this fault the IDE fails to launch a debug session with the symbolic debug information included in the debug session.

    I point this out here to show how low the quality bar has become for Microchip software tools.
    #3
    jvourv
    New Member
    • Total Posts : 9
    • Reward points : 0
    • Joined: 2010/03/07 08:44:57
    • Location: 0
    • Status: offline
    Re: MPLABX v5.40 PIC18F27Q10 simulator crash when PWM2 enabled 2020/09/20 02:13:21 (permalink)
    0
    Simulating process for CCPx seems that is also broken for PIC18F57Q43.
    Logic Analyzer shows zero value when I add the CCPx output as well as the corresponded PORT registers.
    The same is true when I monitor PORT pins in case someone changes according Duty Cycle and PWM period.
    The code I used is the following (which is functional using the pic18f57q43 hardware):
    void main(void)
    {
        ANSELCbits.ANSELC0 = 0;
        TRISCbits.TRISC0 = 0;
        T2CLKCON = 1;
        T2PR = 255;
        T2CON = 0;
        T2CONbits.ON = 1;
        // CCP1 -> RC0
        RC0PPS = 0x15;
        CCP1CONbits.MODE = 0b1100;
        CCP1CONbits.FMT = 0;
        CCP1CONbits.EN = 1;
        CCPR1 = 0x200;
        while(1);
        return;
    }
    Please let me know if I am missing something or if it's a tool's bug.
     
    Best Regards,
    Yiannis
    #4
    dan1138
    Super Member
    • Total Posts : 3990
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: MPLABX v5.40 PIC18F27Q10 simulator crash when PWM2 enabled 2020/10/26 10:57:51 (permalink)
    +2 (2)
    @Yiannis,
     
    Sorry for such a late reply to your post. I've been focused on other stuff.
     
    I doubt you've missed anything.
     
    MPLABX the simulator and the logic analyzer tools are so riddled with bugs that the combination cannot be used by non-experts in the PIC controller architecture.
     
    It seems that only persons that have sufficient experience with Microchip controllers that they do not need the simulator or logic analyzer can actually make use of them.
    #5
    Jump to:
    © 2020 APG vNext Commercial Version 4.5