Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # git diff core/PRU.cpp
- diff --git a/core/PRU.cpp b/core/PRU.cpp
- index 90675f5a..a273001d 100644
- --- a/core/PRU.cpp
- +++ b/core/PRU.cpp
- @@ -560,6 +560,7 @@ int PRU::initialise(BelaHw newBelaHw, int pru_num, bool uniformSampleRate, int m
- void PRU::initialisePruCommon(const McaspRegisters& mcaspRegisters)
- {
- +#define FORCE_MCASP_IRQ // force to use McASP->PRU IRQ
- uint32_t board_flags = 0;
- switch(belaHw) {
- case BelaHw_BelaMiniMultiTdm:
- @@ -690,6 +691,10 @@ int PRU::start(char * const filename, const McaspRegisters& mcaspRegisters)
- fprintf(stderr, "Error: unrecognized hardware\n");
- return 1;
- }
- +#ifdef FORCE_MCASP_IRQ
- +pruUsesMcaspIrq = true;
- +#endif // FORCE_MCASP_IRQ
- +
- if(gRTAudioVerbose)
- printf("%ssing McASP->PRU irq\n", pruUsesMcaspIrq ? "U" : "Not u");
- @@ -740,10 +745,12 @@ int PRU::start(char * const filename, const McaspRegisters& mcaspRegisters)
- }
- if(pruUsesMcaspIrq)
- {
- +#ifndef FORCE_MCASP_IRQ
- if ((rtdm_fd_mcasp_to_pru = __wrap_open(rtdm_driver, O_RDWR)) < 0) {
- fprintf(stderr, "Unable to open rtdm driver to register McASP interrupts: (%d) %s.\n", errno, strerror(errno));
- return 1;
- }
- +#endif
- // For rtdm_fd_mcasp_to_pru we use an arbitrary mapping to set up
- // the McASP to PRU interrupt.
- // We use PRU-INTC channel 0, which will trigger the PRUs R31.t30
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement