Commit Graph

794 Commits

Author SHA1 Message Date
Felix Held b5d937a00c add memory map and irq table for sam3s and sam3u devices 2014-02-06 23:06:55 +01:00
Frantisek Burian 8d5ad52e0f Fix the stm32f0 evident bugs 2014-02-06 11:23:01 +01:00
Stefan Agner 7681597e42 Use type suffix to avoid warnings
When compiling with all warnings enabled, some defines can lead to
warning due to missing unsigned type suffix:

warning: integer overflow in expression [-Woverflow]

This fix should not affected behavior at all, since calculation with
such overflows lead to the same actual address when writing to that
location. However, it makes the warning disappear and also defines
the right data type for a memory location.
2014-02-06 00:59:39 +01:00
Ken Sarkies 0af6d06eda Deduplication of flash code for STM32F0 and F1.
Extension of code for STM32F1 to allow for dual bank series XL.
Small changes to documentation for F2, F4 and L1 to add a parameter reference.

Tested with STM32F103RBT6
(note: tests show that the PG bit must be cleared after programming, otherwise
a subsequent erase attempt fails. This has been added to flash_program_half_word
for F0 and F1 only. A fix for the other families is not included in this PR.)
2014-02-06 00:52:42 +01:00
Frantisek Burian a4d9a41093 [Style] Don't use editor droppings in files, please. 2014-02-06 00:46:05 +01:00
cmcmanis 07d0076934 Updates for STM32F429 chip
After a few rounds of review, changes are added to support
additional peripherals of the STM32F427/429
2014-02-06 00:41:52 +01:00
Karl Palsson 27bc12de61 stm32: unify bulk of adc convenience functions
This unifies stm32f1, l1, and f4 convenience functions for adc.  The code
should be useable for f2 and f37x as well, but that needs hardware for testing,
and there was no existing implementation. This is the reason for the
"adc_common_v1.c" name, as trying to put all the different families into the
common file name has become too cumbersome.

All of the deprecated routines have been dropped, they've been marked
deprecated for a very long time now, and porting them seemed unnecessary.

This has been tested on f1, l1 and f4 discovery boards, and is based on some
existing l1/f1 unification code from
https://github.com/karlp/libopencm3/tree/rme_l1_master
2014-02-05 10:39:00 +00:00
memeruiz cf21290488 [stm32f3] Moving common f0 an f3 functions together. New init_master function. 2014-02-01 21:11:58 +01:00
Felix Ruess 8782a60b48 [stm32][f1|f3] fix adc_set_injected_sequence 2014-02-01 19:22:17 +01:00
Frantisek Burian 5ba8b10428 Add method to clear the systick value, that is undefined at startup. 2014-01-15 22:37:45 +01:00
Ken Sarkies 3c6e9fd56d Fix a number of top level doxygen issues.
So that the navigation pane works correctly in browsers.
Some additional doc fixes put in where found (but many more still to go).
Added some dummy .c and .h files to bring the associated docs into line.
makefile changed to allow 'make html' as well as 'make doc' (the latter only does html anyway).
2014-01-15 22:19:52 +01:00
Ken Sarkies a54a12e1c9 Documentation added to flash modules for all STM32 families. 2014-01-15 22:09:36 +01:00
Piotr Esden-Tempski a909b5ca9e [Style] Global style fix run. 2014-01-03 01:07:30 +01:00
a1ien 67efedec54 [STM32F2-F4:CRYPTO]Fix hash_set_last_word_valid_bits() 2014-01-02 22:17:46 +01:00
Frantisek Burian d541c14110 [CM3] Systick Add helper function to easily set the desired frequency 2014-01-02 22:09:16 +01:00
BuFran 52758bb8fd [Ethernet] Add support for the ethernet module STM32Fxx7 and Micrel PHY 2014-01-02 22:02:54 +01:00
BuFran 723e1a69bd Better method of reset and clock handling with RCC, support L1, F1, F2, F3, F4 2014-01-02 22:00:11 +01:00
BuFran 6a41e5fccb [GENLINK] Moved linker template source to ld directory 2014-01-02 21:50:02 +01:00
molnarkares f7620ae148 * unnecessary PG bit clearing removed from flash word and half-word programming to improve speed
* missing PG bit set is inserted at word programming
2014-01-02 21:41:33 +01:00
Frantisek Burian db3dc42dd6 [CM3:DWT] Add the file to library build process for each target 2014-01-02 21:25:26 +01:00
Frantisek Burian 7ccc0d053e [CM3] Add register definitions for Debug Watch Trace point.
Add provision functions for the use of CPU counter as a high-resolution timer for code benchmarking purposes
2014-01-02 21:25:26 +01:00
Onno Kortmann fe6b542357 STM32F0: Correctly clear pll source bits. 2013-12-16 19:42:21 +00:00
Onno Kortmann f622437cfb STM32F0: Fix PLL multiplication factor for 48MHz setup
It was set to overclocking configuration!
2013-12-16 19:37:07 +00:00
Onno Kortmann 868d65d872 STM32F0: Turn on PLL clock source when asked to
The STM32F05xxx/06xxx manual describes on p.98 (Sec 7.4.1) the RCC_CR
register, on which it says that bit 24 is the PLLON bit which has to be
enabled before using the PLL. This causes the PLL to be enabled with
rcc_osc_on(PLL).
2013-12-16 19:37:06 +00:00
Karl Palsson 0dce37a4d2 [sam] Eliminate warnings
the usart_enable/usart_disable() methods are for api compatibility with other
parts of libopencm3.
2013-12-16 19:31:23 +00:00
BuFran 6570f6eb07 Fix the order of ADC injected channel list
According to RM0090, page 301, paragraph 11.13.12 Note. (For F4, for F1 and F3 is it in the corresponding manuals)

The JSQR are filled always ending at SQR4 ie for those lists we must set this list:

(A)       ->                               JSQ4 = A,
(A,B)     ->                     JSQ3 = A, JSQ4 = B,
(A,B,C)   ->           JSQ2 = A, JSQ3 = B, JSQ4 = C,
(A,B,C,D) -> JSQ1 = A, JSQ2 = B, JSQ3 = C, JSQ4 = D,

The readed values are in correct order, starting from JDR1:

(A)       -> JDR1 = A,
(A,B)     -> JDR1 = A, JDR2 = B,
(A,B,C)   -> JDR1 = A, JDR2 = B, JDR3 = C,
(A,B,C,D) -> JDR1 = A, JDR2 = B, JDR3 = C, JDR4 = D,
2013-12-04 22:03:23 +00:00
podhrmic dfeeda24ba [timers] Fixed typo
- Bit shift should be 2, not 4 (see the datatsheet - TIMx_CMMR2 register)
2013-11-08 16:00:51 -07:00
Karl Palsson 5cbf5619a1 [stm32] Unify f0/f3 SPI and correct all makefiles
The common code wasn't being included in L1 builds, even though the headers now
included the correct definitions.

This combines the two f0 and f3 spi files, which previously differed only in
the number of spi peripherals defined.

Files were renamed to the full "l1f124" style, not because I like it, but
because it's the convention we have, so it's best to apply it rigourously.

Tested on L1 and F100 boards, compile tested only for others, but the examples
repository all compiles too.  (Though the lack of SPI examples for all
platforms was how this broke in the first place)
2013-11-07 21:50:48 +00:00
Karl Palsson a99f4fb620 [stm32] Use correct offsets for UniqueID bits
STM32L1 has a different set of offsets, not just a different base
address, so we can't have common registers definitions.  Also, out of
F0,F1,F2,F3,F4,L1, only the F1 has the odd note about 2x16bit registers
and 2x32bit registers with one 16bit register marked as "This field
value is also reserved for a future feature."  Therefore, replace the
awkward reading out as multiple words and just copy them in.

F0,F2,F3,F4 were missing definitions altogether.

This does _not_ attempt to address the problem of the mismatched base
addresses for Medium+ and High Density L1 parts.
2013-10-15 11:16:14 +00:00
BuFran 8c8592e2b6 [CM3] Fix the set clksource, found and described by ksarkies. 2013-10-06 19:04:41 +00:00
Karl Palsson 822654b16b [stm32f3] Properly turn on the FPU
The vector chipset file was added, but not included in the dispatcher.
Fixes github issue #201
2013-09-23 14:32:35 +00:00
Pavol Rusnak dbb65d9f5b [stm32f2] fix missing USB symbols 2013-09-14 18:28:48 +00:00
Karl Palsson 5dca8c7973 [stm32-l1] Include f103 usb driver in build.
Tested with the h103 cdcacm demo (originally targetting an F103) on a
custom L1 based board and it enumerates successfully.
2013-09-05 17:35:07 +00:00
Karl Palsson a277abe2c1 [usb-f103] Use the "modern" /rcc include instead of f1.
The f103 usb core should be usable on the l1 as well, and the /f1/rcc
isn't explicitly required anymore.  This is an important change to be
able to share the driver.
2013-09-05 17:35:07 +00:00
BuFran f04d6dd82b [DOXYGEN:STM32F3] fix the conflict strings. 2013-08-24 17:01:28 +02:00
BuFran d63bf5ac64 [STM32F3:doc] Add doxygen documentation page to output 2013-08-22 23:08:52 -07:00
BuFran 65eaad938f [Style] checked and corrected 2013-08-22 22:29:40 -07:00
BuFran e19270b3bf [STM32F0:ADC] Add supporting functions to the module 2013-08-22 17:18:42 -07:00
BuFran 81982916e2 [Doxygen] Add complete documentation page to STM32F0 2013-08-22 17:18:42 -07:00
BuFran efc2489d2c [Stylecheck] Code cleaned to current stylecheck script 2013-08-22 17:18:41 -07:00
BuFran 210a17ec97 [STM32F0:SPI] Add initial support 2013-08-22 17:18:41 -07:00
BuFran 1345a3403c [STM32F0:EXTI] Add prelimnary support of exti, common file now in common directory 2013-08-22 17:18:39 -07:00
BuFran 9f8dd28a5c [STM32F0:COMP] Add preliminary support of module 2013-08-22 17:18:38 -07:00
BuFran 4bb18baa59 [STM32F0:RTC] Renamed common files to be consistent to file naming scheme 2013-08-22 17:18:38 -07:00
BuFran cc4c164ebe [STM32F0:DMA] Renamed common file to meet all supported families, added missing files 2013-08-22 17:18:37 -07:00
BuFran 8b0656459b [STM32F0:DMA] Add initial support 2013-08-22 17:18:37 -07:00
BuFran 62a8aca04a [STM32F0:RTC] Add initial support 2013-08-22 17:18:37 -07:00
BuFran c99be0fb96 [STM32F0:IWDG] Add initial support 2013-08-22 17:18:37 -07:00
BuFran 4e566bf8b1 [STM32F0] Add FP_FLAGS to support #159 2013-08-22 17:18:36 -07:00
BuFran eb7d29e115 [STM32F0:GPIO] File renamed to meet the content 2013-08-22 17:18:36 -07:00
BuFran fc02aa6162 [STM32F0:USART] Add support for USART peripheral 2013-08-22 17:18:36 -07:00
BuFran 18c4d299c1 [STM32F0] Add preliminary support for the family 2013-08-22 17:18:35 -07:00
BuFran e1ebcc9da8 [Cortex] Add preliminary support for core-dependent defines ARMv6m / ARMv7m, ARMv7em 2013-08-22 17:18:35 -07:00
Alexandru Gagniuc 52d34c814b Global: Allow overriding float-abi flags
We currently default to "-mfloat-abi=hard -mfpu=fpv4-sp-d16" for M4F cores, and
and variations of "-mfloat-abi=soft" for the others. Keep the M4F default, and
move others to no FP flags for consistency, but allow overriding these flags
via the FP_FLAGS environment variable.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2013-07-07 18:59:33 -07:00
Ben Gamari 63d150008a lpc43xx/ssp: Mark ssp_wait_until_not_busy as static 2013-07-07 18:50:51 -07:00
Ben Gamari 5d4f759c92 lpc43xx/timer: Add timer utilities 2013-07-07 18:50:44 -07:00
Ben Gamari bbde1012a3 stm32/f4/adc: Fix set_resolution
I can only imagine the resolution argument was 16 bits due to some cut
and paste error
2013-07-07 17:22:13 -07:00
Alexandru Gagniuc 0819a49411 usb_control: Mark the control pipe as IDLE after a STALL
After a STALL handshake is transmitted, a control pipe becomes idle. Not
marking the pipe as idle did not affect the STM32 family. Since it
distinguishes between OUT and SETUP tokens, it calls the setup handler
on a SETUP token, regardless of the state of the pipe.

Other families, such as LM4F do not distinguish in software between IN and
SETUP tokens, and need to decide which handler to call based on the state
of the pipe. On these chips, SETUP transactions will not be handled
properly after a transfer was STALLED, as the state machine of the pipe is
b0rked. Unb0rk it.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2013-07-07 17:04:38 -07:00
Dirk Braun ad29d0ce31 [lm4f/usb] fixed lm4f_ep_write_packet() when single byte copied to buffer. 2013-07-07 16:42:02 -07:00
Alexandru Gagniuc 5ea4763845 lm4f: Appease checkpath.pl and de-typedef enums
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2013-07-07 16:33:18 -07:00
Piotr Esden-Tempski 337733b5e5 [STM32L1] Fixed compilaion of usart convenience functions. 2013-07-07 16:01:53 -07:00
Piotr Esden-Tempski 7042beaa91 [Stylefix] Removed trailing spaces and added missing braces. 2013-07-07 16:01:52 -07:00
BuFran 68ee13be4b Doxygen style blocks corrected 2013-07-07 16:01:52 -07:00
Piotr Esden-Tempski 62e6635992 [Style] Fixed style in the newly added F3 code. 2013-07-07 16:01:52 -07:00
Piotr Esden-Tempski b6231dbb49 [Style] Do not define types if not necessary. 2013-07-07 16:01:52 -07:00
Piotr Esden-Tempski 7085867db6 [STM32F3] Split timer common f24 into f234 and f24. 2013-07-07 16:01:52 -07:00
Piotr Esden-Tempski 201c2706b5 [STM32] Removed exti.c from f1 and made global exti.c usable.
Because most changes are internal to a function in exti.c I am leaving
the macro checks in there, otherwise we would end up with a bunch of
code duplication if we used the dispatch system used otherwise
throughout the stm32 part of the library. I bet it could be split up
into more granular functions resulting in more generic code that we
could run through the dispatch system. But I am leaving that as an
excersize for later.
2013-07-07 16:01:52 -07:00
Piotr Esden-Tempski 590135b65f [STM32F3] Moved all F3 specific functions out of common. 2013-07-07 16:01:51 -07:00
Piotr Esden-Tempski 18da63879c [STM32] Rename the f0124 files to f124.
We don't support f0 yet so let's not fool anyone. We may rename those
files back again if when we cross check that it is actually true this
file supports f0.
2013-07-07 16:01:51 -07:00
Piotr Esden-Tempski ebb058825f [STM32F3] Removed all specific F3 stuff out of common files. 2013-07-07 16:01:51 -07:00
Piotr Esden-Tempski f8734dfcd3 [STM32F3] Move the f3 specific stuff out of common. 2013-07-07 16:01:50 -07:00
Federico Ruiz Ugalde 60bdf4eebd stm32f3: f1 usb header files moved to stm32 root directory.
- Now the f1 usb header files serve both the f1 and f3.
- usb_f103 modified to find the new headers file location.
2013-07-07 16:01:50 -07:00
Federico Ruiz Ugalde 934c8dbf4c stm32f3: Usb support added. usb unit is the same as f103.
- memorymap value for usb base changed to the one expected by the
  f103 usb code.
- f3 Makefile updated to build the f102 usb code.
2013-07-07 16:01:50 -07:00
Federico Ruiz Ugalde 59b2b5da87 stm32f3: Some additions to rcc.
- Additional frequency configuration (48Mhz, for usb use!)
- FLASH latency decreased (too unnecessarily low before)
- Rcc functions to change usb freq prescaler.
2013-07-07 16:01:50 -07:00
Federico Ruiz Ugalde 011124c33f stm32f3: i2c support increased. Now it works.
- Several functions added (that only work on the f3)
- The data register now has a 8bit access counter part
  that is necessary for 8bit transmissions, together with
  the access functions.
- The init master functions doesn't work for the f3.
2013-07-07 16:01:50 -07:00
Federico Ruiz Ugalde 9b2873d874 stm32f3: Adding convinience functions for sending and receiving i2c data. 2013-07-07 16:01:50 -07:00
Federico Ruiz Ugalde 66eab73570 stm32f3: Some additional f3 clock functions for the i2c. 2013-07-07 16:01:49 -07:00
Federico Ruiz Ugalde 4673348ff7 stm32f3: i2c support now in f3 directory.
Very few functions can be shared (~ 3). A possible solutions is to move
i2c_common_all to i2c_common_f124, create i2c_common_all and move f3/i2c to i2c_common_f3. Who agrees?
2013-07-07 16:01:49 -07:00
Federico Ruiz Ugalde 8f3675fbfd stm32f3: i2c support removed from the i2c_common_all files because f3 is too different. 2013-07-07 16:01:49 -07:00
Federico Ruiz Ugalde e9375dbfd2 usart set baudrate clock source incorrect. Now fixed. 2013-07-07 16:01:49 -07:00
Federico Ruiz Ugalde efe08e4898 stm32f3: flash_common_f24 now includes f3 support. Also, renamed to f234.
- Makefiles of other stm32s updated accordingly.
- f3/rcc.c updated to some definition changes.
- f3/flash.c removed in order to use flash_common_f234.c to comply with new organization.
2013-07-07 16:01:49 -07:00
Federico Ruiz Ugalde 74a313625f stm32f3: timer support added. 2013-07-07 16:01:48 -07:00
Federico Ruiz Ugalde 6af6cec101 stm32f3: dma support added. 2013-07-07 16:01:48 -07:00
Federico Ruiz Ugalde 433c1c9db8 stm32f3: spi support added. 2013-07-07 16:01:48 -07:00
Federico Ruiz Ugalde 5c825a78c7 stm32f3: watchdog support added. 2013-07-07 16:01:48 -07:00
Federico Ruiz Ugalde 6b522fc644 stm32f3: Crc support added. 2013-07-07 16:01:48 -07:00
Federico Ruiz Ugalde ef762f0448 Stm32f3: usart support added. 2013-07-07 16:01:48 -07:00
Federico Ruiz Ugalde 49fe59e82d stm32f3: adding external interrupts support. 2013-07-07 16:01:47 -07:00
Federico Ruiz Ugalde a7bcf6446b stm32f3 dac support added. 2013-07-07 16:01:47 -07:00
Federico Ruiz Ugalde 0a39eab19a Missing files for adc stm32f3 support added. 2013-07-07 16:01:47 -07:00
Federico Ruiz Ugalde 6732ae25cb Adc stm32f3 support added. 2013-07-07 16:01:47 -07:00
Federico Ruiz Ugalde be841154a9 i2c support added.
Most of the changes went to i2c_common_all.h file.
F3 is considerably different than all the other in i2c.
2013-07-07 16:01:47 -07:00
Federico Ruiz Ugalde b6bae46b71 Unnecessary include of pwr.h removed from rcc.c. Pwr.h becomes unnecessary to run the f3 2013-07-07 16:01:47 -07:00
Federico Ruiz Ugalde 934821aa42 Partial flash support added. 2013-07-07 16:01:47 -07:00
Federico Ruiz Ugalde 45035f2f3c Fixed compile warning, function declaration in rcc.h wrong 2013-07-07 16:01:46 -07:00
Federico Ruiz Ugalde 0ca18eb09f Added interrupts for f3, Pre_main rutine in vector_chipset, nvic.h modified to include f3. 2013-07-07 16:01:46 -07:00
Federico Ruiz Ugalde b8764d0214 Makefile for f3 lib added. Gpio.c and rcc.c also in. 2013-07-07 16:01:46 -07:00
Federico Ruiz Ugalde 67c979e5fa Fixed compile of f4 and l1 after gpio_common_f234.c renaming. 2013-07-07 16:01:46 -07:00
Federico Ruiz Ugalde a156b9e8fc linker script file for f3 added. 2013-07-07 16:01:45 -07:00
Federico Ruiz Ugalde 3af5833b83 Initial support for stm32f3. Changes in makefiles, gpio.
- Makefiles now include building f3 src directory.
- Gpio support added. gpio_common_f24 changed to support also f3.
- f3 still not compiling, but f2 compile not broken (probably also f4).
2013-07-07 16:01:45 -07:00
Ben Gamari d7fdcefbd7 lpc43xx: Fix rom_to_ram linker script
It was missing some definitions compared to the libopencm3_lpc43xx.ld.
2013-07-07 18:22:56 -04:00
Piotr Esden-Tempski b72a3640b3 [CM0] Disabled sync for LPC43xx/M0.
We are currently using the same code for CM0 CM3 and CM4 cores. This
patch is a bodge that disables sync on the LPC43xx/M0 core, it would be
nicer to probably implement a dispatch system similar to the one used in
stm32 peripheral support so that we can accomodate the different
features of the cortex cores. I (esden) assume we will run into more
incompatibilities in the future between the cortex cores.
2013-07-07 13:58:00 -07:00
Ben Gamari 11ea9b090c sync: Add comment 2013-07-07 13:52:16 -07:00
Ben Gamari 78081bd794 lpc43xx: Add irq.yaml for M0 core 2013-07-07 13:52:16 -07:00
Ben Gamari c25461dfce lpc43xx: Move M4 specific files to m4/ 2013-07-07 13:52:15 -07:00
Ben Gamari 3ab761d244 Remove dead lpc43xx_m0/vector.c 2013-07-07 13:52:15 -07:00
Ben Gamari 9aa2f82164 lpc32xx_ram_only.ld: Fix region name 2013-07-07 13:52:15 -07:00
Ben Gamari 8eb5fba93b lpc43xx/uart: Fix code style 2013-07-07 13:52:15 -07:00
Ben Gamari fa47bb80d5 lpc43xx/uart: Fix TER register definition
I'm not sure why bit 7 and offset 0x30 were used previously. Revision
1.6 of UM10503 claims that the TXEN bit is bit 0 in all UARTs' TER
registers.
2013-07-07 13:52:15 -07:00
Ben Gamari 8201703e64 lpc43xx/ssp: Fix duplicate function definition from merge 2013-07-07 13:52:14 -07:00
Ben Gamari 994e679fb8 lpc43xx: Clean up linker script breakage from merge 2013-07-07 13:52:14 -07:00
Ben Gamari e8af7a98ee lpc43xx/ssp: Add ssp_transfer 2013-07-07 13:52:13 -07:00
Ben Gamari 0d29b1d2d6 lpc43: Use uint*_t instead of u* 2013-07-07 13:52:13 -07:00
Ben Gamari 26162762b7 lpc43xx: Update linker scripts 2013-07-07 13:52:13 -07:00
Ben Gamari 17fd708f66 Move lpc43xx and lpc43xx_m0 code to lpc43xx/ hierarchy
Previously there were nasty dependency issues causing M4 objects to be
linked into the M0 library
2013-07-07 13:52:13 -07:00
Hoernchen 16424d1c69 m0: remove useless remap
The m4 will 1) remap 2) start the m0, so it already is remapped, if it's
not, then we'd never execute this code anyway.
2013-07-07 13:52:13 -07:00
Hoernchen 4c8d260232 make sure the m0 is really running/stopped 2013-07-07 13:52:13 -07:00
TitanMKD e5a4dd0609 Cleanup M0 makefile to avoid copying file from lpc43xx(M4) directory. 2013-07-07 13:52:13 -07:00
TitanMKD 786e3215a4 Fixed a problem with rom to ram. (which can produce error "cannot move location counter backwards") 2013-07-07 13:52:12 -07:00
TitanMKD 0dec187fee lpc43xx basic IPC for multicore M4 & M0 (with basic examples for hackrf jellybean). 2013-07-07 13:52:12 -07:00
TitanMKD edab264704 Added _data_rom / _edata_rom for ld ram only and standard spifi ld Fixed ROM to RAM copy of ".data" 2013-07-07 13:52:12 -07:00
Jared Boone f4e45e74bc Add a duty cycle count argument to i2c0_init() to adjust for changes in APB1 clock. 2013-07-07 13:52:12 -07:00
Jared Boone 18bcbc3d28 Consolidate ssp_read and ssp_write into a single function, ssp_transfer. SSP bus transfers are bi-directional -- when bytes are written, they are also read. 2013-07-07 13:52:12 -07:00
Jared Boone 25d7853422 Switch ssp.c to using CGU #defines instead of local #defines. 2013-07-07 13:52:12 -07:00
Jared Boone 18d72099a5 Changed ldscripts to use new RAM region names, placed .data/.bss/stack into separate local RAM region.
Added ldscript for RAM-only debugging over SWD or JTAG.
2013-07-07 13:52:10 -07:00
Jared Boone ffffb71ba2 Added distinct _bss ldscript constant, in case .text and .bss are not contiguous. 2013-07-07 13:52:10 -07:00
Jared Boone 24d8d81b43 Add generated bit/shift/mask #defines for CGU, CREG, RGU, USB (USB0 only) peripherals.
Added script used to generate #defines above.
Fixed one small change in the #define naming scheme in i2c0_init().
2013-07-07 13:52:08 -07:00
TitanMKD f8542c09a6 UART driver and Example code for JellyBean. 2013-07-07 13:52:07 -07:00
Piotr Esden-Tempski 2f425af647 [Style] A small coding style fixing session. 2013-07-05 20:35:13 -07:00
Piotr Esden-Tempski 56e2928ebe [Style] Removed trailing spaces. 2013-06-30 23:40:44 -07:00
BuFran c2f7128459 Linker generation script for most of the supported chips 2013-06-30 23:30:35 -07:00
Piotr Esden-Tempski beeb9c3f65 [Style] Do not declare new types if not really necessary. 2013-06-30 22:20:51 -07:00
Piotr Esden-Tempski 647b878031 [Style] Coding style fixes.
* No trailing white spaces
 * No sapces before tabs
 * "int *var" and not "int * var"
2013-06-30 22:09:25 -07:00
BuFran 035c67ced6 Add preliminary support for Cryptographic coprocessor on stm32 F2 and F4 2013-06-30 21:20:42 -07:00
Piotr Esden-Tempski cabbd21329 Reverted the __packed and __aligned change.
We should not add compiler extensions, it is not our job. We are not a
selfcontained project as kernel is so we should not introduce things
like this.

If we need to add some abstraction for this in the future to support
compilers doing these things differently then we will do that the same
way we dealt with the depricated attribute.
2013-06-13 10:29:43 -07:00
Piotr Esden-Tempski 8da7fbd71e Changed to use accessors instead of casting to volatile pointers.
In places where we were defining memory mapped peripheral buffers we
were using directly a cast to "volatile int_type *". For consistency we
should use dereferenced accessor like: &MMIO32(address)
2013-06-12 21:37:55 -07:00
Piotr Esden-Tempski 39fa9e4c58 Stile fixes run, 80 char boundry. 2013-06-12 21:07:35 -07:00
Piotr Esden-Tempski 34de1e776e Changed to use stdint types. 2013-06-12 19:11:22 -07:00
Piotr Esden-Tempski 7df63fcae0 First coarse run to fix coding style in locm3.
Added --terse and --mailback options to the make stylecheck target. It
also does continue even if it enounters a possible error.

We decided on two exceptions from the linux kernel coding standard:
- Empty wait while loops may end with ; on the same line.
- All blocks after while, if, for have to be in brackets even if they
  only contain one statement. Otherwise it is easy to introduce an
  error.

Checkpatch needs to be adapted to reflect those changes.
2013-06-12 18:22:56 -07:00
Felix Ruess 0bf8324c91 stm32f1: add timer.o to objects for timer_ic_set_polarity 2013-06-04 18:44:19 +02:00
Karl Palsson a5966093e6 [stm32l1] Never write illegal values to voltage range selection
According to the reference manual, you are _forbidden_ from writing 00 to the
VOS[1:0] bits in PWR_CR.  Writing a 00 is automatically turned into range 2,
or, 10.  Attempting to then |= the bits for range 1 (01) results in the final
result of choosing voltage range 3 (11).  This has fairly catastrophic effects
if you then attempt to switch to PLL clock at 32Mhz.

Oddly, the existing code was working fine on STM32L151C6 revision W, but
failing with revision V silicon.  Regardless, the existing code was wrong and
not following the reference manual.

Further, attempting to change any power voltage range settings without the RCC
enabled will have no effect, so all the higher level helper routines
have added peripheral enable lines before attempting to set the range.
2013-06-03 19:38:37 +00:00
Karl Palsson 8cfaef7fb6 [stm32l1] Don't use an intermediate clock in setup
This switch to HSI was an attempt to run the setup code faster. However,
there's no real need for this, and it just confuses things by switching first
to one clock, and then to another.  Just keep running on the existing clock
until switching to the clock actually chosen by the user's arguments.
2013-06-03 19:38:37 +00:00
Ben Gamari d90ec98f52 stm32: Add missing exti_get_flag_status 2013-06-02 18:32:40 -07:00
Mikhail Avkhimenia 15e35d5bc1 [stm32] Added basic support for hash processor
Added hash processor register definitions and main functions. Hash
processor is supported in stm32f21, stm32f41 and stm32f43 and can be
used to calculate Md5 and Sha1.
2013-06-02 18:23:49 -07:00
Ken Sarkies f5c9bdfe61 Changes to doxygen markup to solve a few problems that upset
doxygen, and to correct minor errors.
2013-06-02 18:17:49 -07:00
Karl Palsson bad5580492 [make] Use less shell variables
Use fixed variables for things that can't change, instead of variables
like SRCLIBDIR that was causing a shell call for every single use.

Use less functions in general and less shell expansions.

Use builtin functions like $(realpath blah) instead of $(shell
pwd)/blah  In particular, this was important for me trying to build on
windows with git-shell.  This should help a lot on smaller build
machines, but doesn't make a huge difference on my own.

Remove redundant clean print messages. These also cause more needless
shell expansions.
2013-06-02 18:11:49 -07:00
Paul Fleischer b876b72b39 lm4f: Add control over UART FIFOs 2013-06-02 18:05:49 -07:00
Gareth McMullin 662a2cb8fa sam: Add convenience function for clock setup using internal 4MHz. 2013-06-02 18:01:38 -07:00
Gareth McMullin ce3e3dc39b Split sam3x/sam3n support. 2013-06-02 18:01:38 -07:00
Alexandru Gagniuc 4535a4c9b6 lm4f: Implement GPIO interrupt control
Implement an API to specifiy the interrupt trigger for GPIO pins, and
control interrupts. This completes the GPIO API.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2013-06-02 16:16:46 -07:00