Michal Horn [Mon, 10 Nov 2014 12:07:20 +0000 (13:07 +0100)]
Fix pins multiplexing for RM48
Used peripherals: ADC1, CAN1-3, GIOA, GIOB, HET1, EMIF, SCI
Some pins fron NHET1 port has been disabled, bacause they are shared
with SCI, which is also used.
Michal Horn [Wed, 29 Oct 2014 13:31:07 +0000 (14:31 +0100)]
Remove excessive rpp library files from the RM48 project
The HDK with RM48 does not have some peripherals that the RPP board
does have and some peripherals that are present for both board are not
desired for the current project. Those files for high-level support have
been removed from the project. Lower layers functions are still present.
Michal Horn [Wed, 12 Nov 2014 14:28:04 +0000 (15:28 +0100)]
Disable Flash ECC
The simulink download code to the target is not working with Flash ECC
enabled, because the download script has not enabled the Auto ECC generation.
This could be fixed easily by some switch. But worse thing is, that Open
OCD stopped working as well, because of the same reason and the fix may not
be so easy as for Ti Download script.
So for now the best solution is to disable the ECC.
Michal Horn [Fri, 7 Nov 2014 13:58:13 +0000 (14:58 +0100)]
Fix MCU initialization
The old HALCoGen version generated error for Enabling Flash ECC.
0x0C000000 caused that RAM ECC was enabled instead of the Flash ECC.
See section 2.22 and 2.5 for more detiails.
Michal Horn [Fri, 7 Nov 2014 12:52:11 +0000 (13:52 +0100)]
MCU startup fix
When the MCU starts up, it sometimes ended in a esm group3 error with
flag 0x8, which means RAM error. Now it fails approximately every
second boot.
The RAM may not sometimes be initialized properly, becuse wrong bit has
been checked in a waiting loop. This error was caused by the HALCoGen
version used for the first code generatoin.
PBIST self check used non volatile variables for waiting loop. Those loops
may be removed by compiler in some optimizatoin step. The self check itself
has been replaced by improved version from newer HALCoGen.
Michal Horn [Mon, 3 Nov 2014 15:06:45 +0000 (16:06 +0100)]
Implement device specific configuration file
Each device can have different endianity, source clock and clock tree.
Those and some other parameter regarding the frekvencies on each clock
tree branches can be configured in the sys/port.h file
Michal Horn [Wed, 22 Oct 2014 13:37:50 +0000 (15:37 +0200)]
SCI driver modified to work with Ti HDK
The HDK uses different port for SCI than the RPP board. HDK uses
SCI/LIN port, RPP uses SCI2 port. In order to get it working, sci base
register has to be switched and ISR for the sci/lin has to be set in
the VIM.
This implementation is horrible and has to be reworked. It is working though.
Michal Horn [Wed, 22 Oct 2014 11:45:45 +0000 (13:45 +0200)]
MCU initialization tuned for RM48
- Registers definitions switched to little endian.
- Pinmux tuned for RM48 with GPIOA, GPIOB and EMIF enabled, NHET, DMM,
SCI2 and EMAC disabled.
- Wrong value systemREG1->MINITGCR = 0xA fixed to 0x5 for disable
memory HW initialization. This value has been badly generated by the old
HALCoGen version.
- TMS570 specific memory tests for FRAY and FTU disabled.
- PLL and clock domains settings tuned:
RM48 can run on higher frequency, which required increacing the
PLL multiplication factor and decreasing VCLK divider.
Also unused Clock domains (RTI, EMAC, USB) has been disabled.
Now the code is able to enter the main() function.
Michal Horn [Mon, 20 Oct 2014 15:21:13 +0000 (17:21 +0200)]
Library prepared for future use of new versions od FreeRTOS
lwip has been modified to be compatible with the newest FreeRTOS without
warnings, so the library has to be also slightly modified to reflect the changes.
Macro for data type casting of the task name for xTaskCreate function added,
as this function has the name parameter with different data type for newer
FreeRTOS version.
Michal Horn [Tue, 14 Oct 2014 13:51:56 +0000 (15:51 +0200)]
More warning in compile of the apidoc fixed
Those warnings are caused by unsupported parameter inout in the version
on the builbot. But the functions arguments marked as inout are used as out
only inside the function. So I have changed their mark to out.
Michal Horn [Mon, 13 Oct 2014 12:16:56 +0000 (14:16 +0200)]
Fixed compile errors when building the POSIX version
I have missed some directives in sci_posix.c, sys_startup.c and notification.c in previous commit.
Also rppPOSIX_VERSION definition has been removed as it can be substituted by FREERTOS_POSIX.
Michal Horn [Fri, 10 Oct 2014 14:29:35 +0000 (16:29 +0200)]
RPP Library initalization rewritten.
There was only one function - rpp_init(), which initialized every
peripherals in the system, even if some of the peripherals were not
used by the software.
Now the rpp_init() is only convenient function and every needed
peripheral should be initialized by calling its own init function.
As a result, we were able to get rid of lots of ifdef and define
macros and resulting binary file is smaller.
Michal Horn [Thu, 9 Oct 2014 10:44:00 +0000 (12:44 +0200)]
CAN timing parameters calculation fixed, interface for manual specification of timing parameters added
The previous algorithm for timing parameters calculation from desired
baudrate was working only for few baudrates values. When tested from
100kb to 1mb with step 100kb, only 100, 500 and 800kb were working
correctly. The new algorithm is much better. Now only 300, 600 and 900kb
are not working correctly, when communicating with PC via USB2CAN.
For the cases that non working baudrate is desired or more control
over the frame timing is needed, an interface for manual timing
specificatiion has been implemented.
Michal Horn [Tue, 26 Aug 2014 08:40:36 +0000 (10:40 +0200)]
Fixed bug in CAN configuration, fiiltering settings
This bug caused the message filtering malfunction when mask was defined.
Now the standart, extended and mixed message ID filtering with mask definition is supported.
When mixed is selected, only he higher bits of the Mask and ID registers are used.
Michal Sojka [Tue, 19 Aug 2014 17:16:55 +0000 (19:16 +0200)]
Update to fixed lwip version
The commit message from lwip submodule:
Remove inline from non-static functions
It seems that the compiler/CCS is somehow buggy when it sees non-static
inline functions, because the build is successful on desktop computers
but not buildbot's server. This change solves the buildbot failure. The
error message was:
Karel Kočí [Tue, 19 Aug 2014 13:08:12 +0000 (15:08 +0200)]
Add implementation of IRC module.
Added implementation of IRC. Implementation is in new files
ti_drv_het2.c/ti_drv_het2.h, because IRC is implemented on second N2HET.
New header file of RPP API irc.h is also added to rpp.h with macro
condition rppCONFIG_INCLUDE_IRC. And also added call of rpp_irc_init()
in rpp_init() for initializing to rpp.c.
Added DIN 10,11 and 14,15 blocking when IRC1/2 is running. For this reason are
added new global variables: rpp_irc1_enabled, rpp_irc2_enabled.
Program for N2HET in ti_drv_het2.c was build with NHET Assembler. Source file is ti_drv_het2_irc.het
and is in same folder as ti_drv_het2.c.
Added new function setMuxForIRC() for pinmux for HET2 (file sys_pinmux.c/.h).