Search found 69 matches
- Mon Dec 17, 2012 11:57 pm
- Forum: bug reports
- Topic: Alignment of DMA memory for ADC corrupts
- Replies: 0
- Views: 26202
Alignment of DMA memory for ADC corrupts
Using the ADC inputs in a model generated a dsPIC_DMA_Buffers.c file that has the following line: volatile uint16_T ADCBuffChannelDMA[(2)] __attribute__((space(dma),aligned(256))); The problem with this is it can cause problems with other DMA uses if those aren't aligned to 256 as well. I can't thin...
- Fri Feb 17, 2012 8:33 pm
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Add support for dsPIC33fj64mc802
- Replies: 1
- Views: 19021
Re: Add support for dsPIC33fj64mc802
Nevermind, it looks as if this part is supposed by the blockset, though it's at the bottom of the list and out of order. Lubin, can you reorder the list of PICs so that they're in order? This'll make it easier to find the part you want.
- Wed Feb 08, 2012 8:22 pm
- Forum: bug reports
- Topic: Heap can't be configured for MPLAB
- Replies: 1
- Views: 20734
Heap can't be configured for MPLAB
If you specify a heap size for your project in Simulink under Code Generation->DsPIC options->LDFLAGS then this same setting won't apply to the generated MPLAB 8 project and you'll need to manually specify a heap size. This means that the default project created by your blockset when a heap is speci...
- Wed Feb 08, 2012 8:07 pm
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Support more inputs for C-function Call Block
- Replies: 4
- Views: 27898
Re: Support more inputs for C-function Call Block
Just pack all of your variables into an array and pass that. If they're different data types pack them all into an array of uint8s, uint16s, or uint32s and unpack them on the C end.philippe.1 wrote:Could you tell me how do you do to pass your 4 variables please,
- Tue Jan 24, 2012 1:03 am
- Forum: Requirement, Installation & Configuration
- Topic: Required Matlab components
- Replies: 4
- Views: 28593
Re: Required Matlab components
This kind of explains it: http://blogs.mathworks.com/seth/2011/04 ... he-coders/. But when installing I was required to add Matlab Coder in addition to these like resodad mentioned. Looks like the base requirements are: Matlab, Simulink, Simulink Coder, Embedded Coder, and Matlab Coder.
- Tue Jan 24, 2012 12:58 am
- Forum: bug reports
- Topic: Failed compilation still generated MPLAB 8 project
- Replies: 4
- Views: 29428
Re: Failed compilation still generated MPLAB 8 project
If I build a project and it fails compilation an MPLAB 8 project is generated but NOT an MPLAB X project. I just thought it was weird that a project was generated for only one of the IDEs and not both. I figured it was a bug because you'd either want no project to be generated when compilation faile...
- Mon Jan 23, 2012 10:24 pm
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Add support for dsPIC33fj64mc802
- Replies: 1
- Views: 19021
Add support for dsPIC33fj64mc802
This is the dsPIC33f chip included with the MicroStick development board by microchip and we have a bunch of them. It'd be nice if they worked with your blockset.
- Sun Jan 22, 2012 11:37 pm
- Forum: bug reports
- Topic: Interface Tx-Matlab rs232gui block fails in 2011b
- Replies: 1
- Views: 21055
Interface Tx-Matlab rs232gui block fails in 2011b
I can't open the Interface Tx-Matlab block in 2011b. The following error occurs: Error due to multiple causes. --> Error evaluating 'OpenFcn' callback of S-Function block (mask) 'power_test/dbl-click to open Graphical interface'. --> Cannot find an exact (case-sensitive) match for 'rs232GUI'. Do you...
- Thu Jan 19, 2012 6:10 pm
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Support for returning structs from C-Function Call block
- Replies: 3
- Views: 22100
Re: Support for returning structs from C-Function Call block
Is there any possibility for this support to be added? I use busses extensively in my Simulink code and being able to pass them unmodified into the C-function call block would drastically simplify my models.
- Tue Jan 17, 2012 8:34 pm
- Forum: bug reports
- Topic: Failed compilation still generated MPLAB 8 project
- Replies: 4
- Views: 29428
Re: Failed compilation still generated MPLAB 8 project
But there isn't a similarly compiled MPLAB X project, which is why I assumed this was a bug. I'd prefer to switch over to X whenever possible, so could you also make the MPLAB X project be generated?
- Mon Jan 16, 2012 8:40 pm
- Forum: bug reports
- Topic: Failed compilation still generated MPLAB 8 project
- Replies: 4
- Views: 29428
Failed compilation still generated MPLAB 8 project
If my project fails compilation then a .mcp file for MPLAB 8.x is still generated.
- Fri Jan 13, 2012 6:03 pm
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Support more inputs for C-function Call Block
- Replies: 4
- Views: 27898
Re: Support more inputs for C-function Call Block
It's not a show-stopper, just an inconvenience. I have a lot of functions that just need to pass 4 variables to the function and it's annoying to have to pack that small amount of data to transmit it to C. There's no way to have the C-function call block allow for an arbitrary number and size of var...
- Thu Jan 12, 2012 3:37 am
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Support more inputs for C-function Call Block
- Replies: 4
- Views: 27898
Support more inputs for C-function Call Block
It'd be nice if up to 6 inputs could be supported by the C-function Call Block. Not knowing how the backend works, I can't say whether this is indeed possible, but it'd be nice if it was.
- Thu Jan 12, 2012 3:36 am
- Forum: bug reports
- Topic: MPLAB 8.x project not generated properly during compile
- Replies: 6
- Views: 36981
Re: MPLAB 8.x project not generated properly during compile
This was fixed for me in the new 3.7b release.
- Sat Dec 10, 2011 1:46 am
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Support for CAN Module?
- Replies: 34
- Views: 140744
Re: Support for CAN Module?
So I recently went through and updated my ECAN code. I also actively use these blocks, so it's known to be good. Link is here: https://github.com/Susurrus/ECAN_dspic. Just add it to your Matlab path as another library and you're good to go.
- Sat Dec 10, 2011 1:36 am
- Forum: bug reports
- Topic: MPLAB 8.x project not generated properly during compile
- Replies: 6
- Views: 36981
Re: MPLAB 8.x project not generated properly during compile
You'll need to add the two non-Autoboat directories to the matlab path. The actual model is in \Autoboat\Code\basic_model.
- Tue Dec 06, 2011 10:45 pm
- Forum: bug reports
- Topic: MPLAB 8.x project not generated properly during compile
- Replies: 6
- Views: 36981
Re: MPLAB 8.x project not generated properly during compile
I have version 3.66b. I'm also seeing compilation work for some other projects that I have, so it seems specific to this one.
- Tue Nov 08, 2011 8:45 pm
- Forum: bug reports
- Topic: MPLAB X not found during compilation
- Replies: 0
- Views: 26244
MPLAB X not found during compilation
I recently updated my MPLAB X to 7.12 and now I get an error during compilation: The path 'C:\Program Files (x86)\Microchip\MPLABX\mplab_ide\bin\LaunchMPLAB_IDE.exe' does not exist That EXE does indeed not exist, the path 'C:\Program Files (x86)\Microchip\MPLABX\mplab_ide\bin\mplab_ide.exe' does exi...
- Mon Nov 07, 2011 8:25 pm
- Forum: bug reports
- Topic: MPLAB 8.x project not generated properly during compile
- Replies: 6
- Views: 36981
MPLAB 8.x project not generated properly during compile
I'm compiling a project and the MPLAB 8.x project isn't being properly generated. I'm seeing the following at the end of code generation: " ---33fJ256GP710---" "*** Created "executable": ..\../code_gen.cof" ''pic30-bin2hex ..\../code_gen.cof "*** Converted code_gen.cof to code_gen.hex" . "*** MPLAB:...
- Fri Sep 30, 2011 4:56 pm
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Add support for dsPIC33E line
- Replies: 0
- Views: 25886
Add support for dsPIC33E line
As title suggest. It'd be nice to have support for the dsPIC33E series of processors now too.
- Fri Sep 09, 2011 7:31 pm
- Forum: bug reports
- Topic: MPLAB X link post-compilation errors
- Replies: 1
- Views: 21031
MPLAB X link post-compilation errors
Clicking the MPLAB X link within MATLAB gives me an error and doesn't launch MPLAB X. The link for launching MPLAB 8, however, is correct. Here is what I see at the end of compilation along with the errors. After compilation I clicked the MPLAB X link, then the MPLAB 8 link, then the MPLAB X link ag...
- Tue Sep 06, 2011 7:03 pm
- Forum: bug reports
- Topic: ADC block sets configures all pins to the ADC
- Replies: 8
- Views: 34800
Re: ADC block sets configures all pins to the ADC
So regarding the weird voltages I'm seeing, that's most like a board issue, but I'm not willing to debug that right now. So I've reread Section 16: Analog-to-Digital Converter of the dsPIC manual and it does appear that the pins should default to ADC input so that the digital input buffers can be di...
- Sun Aug 14, 2011 6:05 pm
- Forum: General Remark and Questions
- Topic: dsPIC33FJ256GP710A compatible?
- Replies: 3
- Views: 26113
Re: dsPIC33FJ256GP710A compatible?
I've gotten those same failures when the PICkit2 verifies the image. Try erasing the chip first and then programming, that has never failed for me.
- Sun Aug 14, 2011 6:03 pm
- Forum: bug reports
- Topic: restorePath, and slbuild errors, matlab working directory ch
- Replies: 8
- Views: 42143
Re: restorePath, and slbuild errors, matlab working director
For the path configuration settings on Windows Vista and 7 you need to run Matlab as an administrator (right-click on the link and select Run as administrator) in order to permanently edit the path. This is a permissions issue with Windows that Mathworks hasn't fixed as of 2010a at least.
- Sun Jul 24, 2011 8:45 pm
- Forum: bug reports
- Topic: Multiple blocks of ADC doesn't trigger error
- Replies: 0
- Views: 26262
Multiple blocks of ADC doesn't trigger error
According to another post of yours you say the following: The error comes from the multiple use of blocks that should be used only once in a model : If you are to use more that one Input Capture port, use only One block IC and configure this block to get many IC ports. Same remark for the ADC block,...
- Wed Jul 20, 2011 1:09 am
- Forum: bug reports
- Topic: ADC block sets configures all pins to the ADC
- Replies: 8
- Views: 34800
Re: ADC block sets configures all pins to the ADC
So here's an additional model that exposes the problem also. In this model I am merely attempting to read the temperature value from the TC1047 chip that is onboard the Explorer16. If I use your ADC code, I get values that are almost exactly 1V higher than they should should. I should note that I al...
- Mon Jul 11, 2011 8:17 pm
- Forum: bug reports
- Topic: Compilation with submodels
- Replies: 3
- Views: 23982
Re: Compilation with submodels
I do imagine it's quite complex, but without this functionality larger models become very hard to maintain. Even SLUGS, which isn't that big of a codebase, is incredibly difficult to maintain. We've had to resort to using libraries, but that isn't a desirable nor complete solution to making the proj...
- Mon Jul 11, 2011 8:13 pm
- Forum: bug reports
- Topic: ADC block sets configures all pins to the ADC
- Replies: 8
- Views: 34800
Re: ADC block sets configures all pins to the ADC
That makes sense. What about adding a block just to be able to configure unused pin as either a digital input or ouptut ? Thus, you might then configure any peripheral you wish without modifying either TRIS nor ADC config registers. Yeah, I believe that's how it should be. So this would mean that t...
- Tue Jun 21, 2011 6:42 pm
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Add floating point support to TX Matlab support
- Replies: 0
- Views: 26209
Add floating point support to TX Matlab support
It would be amazing if the TX Matlab block support floating point values, either floats or doubles. Just 32-bit floating point support would be fine to start even.
- Thu Jun 16, 2011 5:48 am
- Forum: bug reports
- Topic: Compilation with submodels
- Replies: 3
- Views: 23982
Re: Compilation with submodels
So I did some more experimenting. It looks like I didn't have the RTW target for the submodel 'controller' set to the dsPIC. Unfortunately, even setting that to the dsPIC didn't fix it. I then added the master block, but that was still giving me errors. I'm not certain if there's anything left on my...
- Thu Jun 16, 2011 12:22 am
- Forum: bug reports
- Topic: Compilation with submodels
- Replies: 3
- Views: 23982
Compilation with submodels
I have run into a problem when compiling a project of mine when using submodels. The submodel never finishes compilation and I don't know why. I get the following errors when it tries to compile my submodel 'controller': Error: File: C:\Users\Bryant\Projects\Autoboat\Code\basic_model\slprj\dspic\con...
- Thu Jun 09, 2011 5:22 pm
- Forum: bug reports
- Topic: ADC block sets configures all pins to the ADC
- Replies: 8
- Views: 34800
Re: ADC block sets configures all pins to the ADC
Yes I believe the default status for a pin should be for it to be a Digital I/O, which really just means NOT being used as an ADC pin. If I don't select an ANx pin to read from, why should it set that pin to be an ADC pin? Was there a reason for this design originally? I believe that if a pin is set...
- Thu Jun 09, 2011 12:44 am
- Forum: bug reports
- Topic: ADC block sets configures all pins to the ADC
- Replies: 8
- Views: 34800
ADC block sets configures all pins to the ADC
If I have the ADC block within my model and build it I see the following configuration bits: AD1PCFGL = (0U); AD2PCFGL = (0U); AD1PCFGH = ((0U) & 65535); /* S-Function "dsPIC_ADC" initialization Block: <Root>/ADC Input */ /* Initialise ADC converter */ /* 0 mean each 1 conversion */ #define NoSample...
- Fri May 13, 2011 7:21 pm
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Port Info block annotation
- Replies: 0
- Views: 26081
Port Info block annotation
Can the port info block be extended to include a mask where the individual pins can be manually annotated. This would be very useful for documentation. So if I was using two pins: RA0 and RA1 I could double-click on the block and the mask parameters would pop up and I could add notes about those pin...
- Mon Apr 18, 2011 3:02 am
- Forum: bug reports
- Topic: Compilation time
- Replies: 0
- Views: 17208
Compilation time
Is it possible for the script to both printout the time it took to compile the model as well as the time when the compilation finished?
- Thu Apr 07, 2011 7:47 pm
- Forum: bug reports
- Topic: Generated MPLAB projects don't properly include source files
- Replies: 6
- Views: 32248
Re: Generated MPLAB projects don't properly include source f
The MPLAB projects generated upon compilation now properly includes all of my source files and builds a debuggable build without configuring any other options. Pretty awesome! I see the following warning at the end about a tcpip file not being found. It isn't part of any sources I included in the pr...
- Wed Mar 30, 2011 8:25 pm
- Forum: bug reports
- Topic: Generated MPLAB projects don't properly include source files
- Replies: 6
- Views: 32248
Re: Generated MPLAB projects don't properly include source f
The code_gen.mdl file is in my Autoboat repo: https://github.com/Susurrus/Autoboat It also relies on the ecan library here: https://github.com/Susurrus/ECAN_dspic I have the projects laid out as follows: /projects /projects/Autoboat/AUTOBOAT_REPO /projects/ECAN_REPO So the autoboat repo is one level...
- Sun Mar 27, 2011 10:34 pm
- Forum: bug reports
- Topic: Generated MPLAB projects don't properly include source files
- Replies: 6
- Views: 32248
Re: Generated MPLAB projects don't properly include source f
This still doesn't work right. Now it just doesn't include the filepath now. I've attached the project generated upon compilation. I've also noticed that the dir_inc variable is defined incorrectly. Notice the start that is "code_gen_dspic\sourcescode_gen_dspic\sources;.;;" The include directories a...
- Sun Mar 27, 2011 9:44 pm
- Forum: bug reports
- Topic: UART RX interrupt always included with config block
- Replies: 1
- Views: 18758
Re: UART RX interrupt always included with config block
Is this something you intend to fix? I notice that it hasn't been fixed for the 3.4cb version and it's actually worse as both interrupts are included when you only have the UART initialization block. I think it'd be very useful for people who don't want to do the initialization by hand but want to h...
- Thu Mar 10, 2011 12:56 am
- Forum: bug reports
- Topic: Infinite sampling-time blocks can't chain together
- Replies: 4
- Views: 24761
Re: Infinite sampling-time blocks can't chain together
Lubin, have you gotten a chance to check this problem out? It's made setting up various initialization calls a lot more tedious than it should be.
- Wed Mar 09, 2011 8:20 pm
- Forum: bug reports
- Topic: Generated MPLAB projects don't allow debugging
- Replies: 2
- Views: 20643
Re: Generated MPLAB projects don't allow debugging
If I change just those two settings I mentioned above, then the .mcp file TOOL_SETTINGS section looks as follows: [TOOL_SETTINGS] TS{7D9C6ECE-785D-44CB-BA22-17BF2E119622}= TS{25AC22BD-2378-4FDB-BFB6-7345A15512D3}= -g -O3 -fschedule-insns -fschedule-insns2 TS{7DAC9A1D-4C45-45D6-B25A-D117C74E8F5A}= -M...
- Wed Mar 09, 2011 8:03 pm
- Forum: bug reports
- Topic: Generated MPLAB projects don't properly include source files
- Replies: 6
- Views: 32248
Generated MPLAB projects don't properly include source files
In my Simulink projects I've used relative paths to include some source files for compilation, like "..\..\..\..\..\ecan\circBuffer.c". When the MPLAB project is generated it just tacks this relative path onto the absolute path of the current working directory so I have file descriptions that look l...
- Wed Mar 09, 2011 7:57 pm
- Forum: bug reports
- Topic: Generated MPLAB projects don't allow debugging
- Replies: 2
- Views: 20643
Generated MPLAB projects don't allow debugging
The MPLAB projects that are generated on compilation don't set up the compilation within MPLAB to allow for debugging and stepping through the code. This is generally what I want to do when I go to use MPLAB. I've found that changing the following options allow for code step-through and variable wat...
- Sat Feb 26, 2011 10:36 pm
- Forum: bug reports
- Topic: Two UARTs in a single model
- Replies: 2
- Views: 20971
Two UARTs in a single model
I'm trying to use the following model to test my hardware setup for using both UARTS. Unfortunately I get an error stating "Error using ==> dsPIC_UART_RX_callback at 76\nProblem".
I've attached the model I'm using for you.
I've attached the model I'm using for you.
- Fri Feb 25, 2011 6:42 pm
- Forum: bug reports
- Topic: Infinite sampling-time blocks can't chain together
- Replies: 4
- Views: 24761
Infinite sampling-time blocks can't chain together
When using infinite sampling times on initialization blocks (remembering to enable inline parameters), these blocks cannot be chained together with the block ordering input/outputs. If you do this, it only calls the final block reducing earlier blocks to zeroes. A workaround for this is to manually ...
- Tue Feb 22, 2011 8:23 pm
- Forum: Request for new functions / Peripheral / Chip support
- Topic: Improve duplicate ports warning
- Replies: 2
- Views: 20938
Improve duplicate ports warning
When I'm compiling my model, I get the following: Warning: --- =========> PORT A0 is used by at least two peripheral <========= --- > In E:\Documents and Settings\Bryant Mairs\My Documents\MATLAB\blocks\dsPIC_PortSetting.p>setTypePort at 525 In E:\Documents and Settings\Bryant Mairs\My Documents\MAT...
- Wed Jan 19, 2011 7:56 pm
- Forum: bug reports
- Topic: PSV model for interrupts not explicitly declared
- Replies: 2
- Views: 21911
Re: PSV model for interrupts not explicitly declared
Oh, it also looks like this affects the UART2 interrupts, but I would imagine this affects all interrupts generated by the blockset.
- Wed Jan 19, 2011 7:50 pm
- Forum: bug reports
- Topic: PSV model for interrupts not explicitly declared
- Replies: 2
- Views: 21911
PSV model for interrupts not explicitly declared
With version 3.0 of the C30 compiler a PSV model is necessary for interrupts. If one isn't specified you get warnings like the following: dsPIC_InputCapture_Interrupt.c: In function '_IC8Interrupt': dsPIC_InputCapture_Interrupt.c:80: warning: PSV model not specified for '_IC8Interrupt'; assuming 'au...
- Thu Sep 16, 2010 5:08 pm
- Forum: bug reports
- Topic: Passing a Vector to the C-Function Call block
- Replies: 5
- Views: 28658
Re: Passing a Vector to the C-Function Call block
This bug still exists. I'd like to keep inline parameters checked as an optimization, is there anyway to fix this on your end, Lubin, or is this something that we're just going to have to deal with? Mariano did find that replicating a Mux block with an embedded Matlab block fixed the bug. I'm not ce...
- Tue Sep 14, 2010 7:13 pm
- Forum: bug reports
- Topic: UART RX interrupt always included with config block
- Replies: 1
- Views: 18758
UART RX interrupt always included with config block
I'm looking to use the configuration block of the UART along with my own custom code for the receive and transmit interrupts. Currently the transmit interrupt is only compiled if you've added the UART TX block. This is not the case with the UART RX block, as the interrupt handler is always compiled ...